Merge registry key by .vbs using GPO /computer configuration - windows-server-2003

We have bought Team Viewer corporate, and need to deploy to our infrastructure, it includes Windows XP SP3, and Windows 7, our domain controller is Windows 2003 SP2, the setting of Team Viewer was exported to .reg file including the passwords and whitelists, I used the .vbs that Team Viewer provided to merge the registry values we exported earlier.
At a testing environment that matches the real environment, the deployment itself runs perfectly using GPO, but the script doesn’t run, if I tried to run the script manually by double clicking the .vbs file, I get “open file security warning” dialogue box, so I disabled it at the attachment manager by adding .vbs to the low risk list and everything worked fine, but the management refused this solution since it will endanger the network by marking all .vbs files as safe, and because it uses “user configuration” rather than using “computer configuration” at GPO, why does this matter? Because users are mobile throughout the regions where we operate, and when a user logs in using their credentials they will trigger the script and the deployment which will affect the network bandwidth.
My question, is there any way to deploy Team Viewer and merge the registry file through .vbs using “computer configuration” at active directory GPO?

Here's an interesting article that suggests using .adm files (instead of .vbs scripts) to propagate a registry change to your users, using Group Policy:
http://blogs.technet.com/b/askds/archive/2007/08/14/deploying-custom-registry-changes-through-group-policy.aspx

Related

Win 10 UWP get appx File

maybe I am blind or I don't understand something right. I have created some HelloWorld-App and now I would like to test in on my device directly. (not via Visual Studios' Remote Tools)
So created my app package in VS but selected "No" for "Uploading to Windows Store" since I want to try it out localy.
The build an verification is successful and all but at the end I got a folder ("HelloWorld_1.0.1.0_Test") in the "AppPackages"-Folder. There are a couple of files. .appxbundle, .appxsym (for each architectiure one)
But if I want to install an app via the device manager it requires an .appx file. Where do I get this one?
I googled a lot, but I only found the descriptions for using the Windows Store.
Isn't it possible without it or am I missing something?
Kind Regards
Pavel
I don't know which device manager you install it through, but an appxbundle should be the fine. It's a ZIP file which includes several appx files (for several display scales, languages, ...).
But generally, inside the AppPackages folder there should be a folder like "AppName_1.0.0.0_Test". VS creates not only the appxbundle there, but also a Powershell script Add-AppDevPackage.ps1. Run it as admin and it installs the app if sideloading is enabled. This should be the easiest option to test apps on other machines without Store submissions.

UAC Manifest file in VS2005 not working

I have an add-in in Excel that needs to store some data in the HKEY_LOCAL_MACHINE registry. because of the UAC control in Windows Vista and earlier versions, I added a manifest file. But it is just not working. I even added the manifests in each of the projects of my solution. I have 5 projects in my solution (3 VB projects, 1 c++ and 1 deployment).
I am using VS2005. I added the manifest file to the project (with the requestedExecutionLevel set to "requireAdministrator" and embedded the manifest using mt.exe in a post-build command.
Even with that, I am still getting an access denied to the HKEY_LOCAL_MACHINE. The only thing that is working is when I start Excel as "Run as administrator".
Any clue what the problem might be? Thanks.
Manifests in DLL do not affect the execution level of the application, in this case it's excel.exe.
Here are the options you have:
to run Excel as administrator;
to modify the add-on to write to HKCU rather than HKLM.
If you need to store data available to other users, consider using ProgramData folder (CSIDL_COMMON_APPDATA or FOLDERID_ProgramData). Then your add-on creates a subdirectory inside ProgramData and modifies its permission so that this new directory is writable by anyone (by default, only the user account that created the folder has write permissions, other users can only read).
There are some other options:
You can write a service that your add-on will communicate to write data into HKLM but it's not.
You can create an elevated COM object which will write the data into HKLM.
Although users don't expect Excel to require elevation when run, therefore consider changing your logic so that your add-on does not require elevation at all.

automatic sync of resharper 7 settings / live templates between several computers

Is it possible to automatically synchronise settings between computers, especially LiveTemplates?
Basically, I would like that if I add a LiveTemplate on a computer, it would be automatically added to all the other development team machines. Currently, the only option I managed was to export the settings to a file (.DotSettings), and then re-import them on another machine. However, this is very tedious if you have computers.
Explicitly move all your settings to solution layer. This would create ".DotSettings" file near your "*.sln" file.
Check this ".DotSettings" file into source control.
After that, use "Save to" to save your settings changes to this layer (and select this layer in Live Templates Explorer).
Now every change to settings now automatically propagates to all of your team computers via source control. Read more about this at http://blogs.jetbrains.com/dotnet/tag/resharper-settings/

How to use IIS app_offline.htm file with Azure

I have a brilliantly designed app_offline.htm file that I'd like to display on my site periodically when I'm doing things like backing up the DB. On a server with a real file system, this wouldn't be a problem: I'd just copy app_offline.htm to the my app's root, and IIS will work its magic and redirect all requests to this file.
However, I'm using Azure, so there's no real file system and there's no easy way move files around from one location to another.
How I can I make app_offline.htm play nicely with Azure?
I figured I'd add this, I haven't seen it mentioned yet. You can actually do this via web publish from Visual Studio (or WebMatrix) as well, just put app_offline.htm in the root of your project - the same level as your main web.config. When done, just rename it and redeploy to go back online. 2 clicks - easy.
The manual option is to drop it into your /site/wwwroot via FTP.
A little personal secret, none of your site files will be accessible, style sheets etc. So put your includes into an azure blob container, and viola.
Actually there is a real file system, as each VM instance runs on Windows 2008 Server (SP2 or R2 SP1). To see this for yourself, enable Remote Desktop for your deployment and connect to a running instance.
Knowing this, you should be able to set up a mechanism to perform a file-copy of your app_offline.htm to your app root based on some type of administrative command. You'll just need to make sure each of your web role instances perform this action.
David has provided you with a good answer. However, you might be missing out on what Azure can do for you. You should be able to virtually eliminate down time with Azure by running multiple instances and using SQL Azure which is triple backed up for you. You can also backup SQL Azure using http://msdn.microsoft.com/en-us/library/ff951624.aspx

What is a good deployment tool for websites on Windows?

I'm looking for something that can copy (preferably only changed) files from a development machine to a staging machine and finally to a set of production machines.
A "what if" mode would be nice as would the capability to "rollback" the last deployment. Database migrations aren't a necessary feature.
UPDATE: A free/low-cost tool would be great, but cost isn't the only concern. A tool that could actually manage deployment from one environment to the next (dev->staging->production instead of from a development machine to each environment) would also be ideal.
The other big nice-to-have is the ability to only copy changed files - some of our older sites contain hundreds of .asp files.
#Sean Carpenter can you tell us a little more about your environment? Should the solution be free? simple?
I find robocopy to be pretty slick for this sort of thing. Wrap in up in a batch file and you are good to go. It's a glorified xcopy, but deploying my website isn't really hard. Just copy out the files.
As far as rollbacks... You are using source control right? Just pull the old source out of there. Or, in your batch file, ALSO copy the deployment to another folder called website yyyy.mm.dd so you have a lovely folder ready to go in an emergency.
look at the for command for details on how to get the parts of the date.
robocopy.exe
for /?
Yeah, it's a total "hack" but it moves the files nicely.
For some scenarios I used a freeware product called SyncBack (Download here).
It provides complex, multi-step file synchronization (filesystem or FTP etc., compression etc.). The program has a nice graphical user interface. You can define profiles and group/execute them together.
You can set filter on file types, names etc. and execute commands/programs after the job execution. There is also a job log provided as html report, which can be sent as email to you if you schedule the job.
There is also a professional version of the software, but for common tasks the freeware should do fine.
You don't specify if you are using Visual Studio .NET, but there are a few built-in tools in Visual Studio 2005 and 2008:
Copy Website tool -- basically a visual synchronization tool, it highlights files and lets you copy from one to the other. Manual, built into Visual Studio.
aspnet_compiler.exe -- lets you precompile websites.
Of course you can create a web deployment package and deploy as an MSI as well.
I have used a combination of Cruise Control.NET, nant and MSBuild to compile, and swap out configuration files for specific environments and copy the files to a build output directory. Then we had another nant script to do the file copying (and run database scripts if necessary).
For a rollback, we would save all prior deployments, so theoretically rolling back just involved redeploying the last working build (and restoring the database).
We used UnleashIt (unfortunate name I know) which was nicely customizable and allowed you to save profiles for deploying to different servers. It also has a "backup" feature which will backup your production files before deployment so rollback should be pretty easy.
I've given up trying to find a good free product that works.
I then found Microsoft's Sync Toy 2.0 which while lacking in options works well.
BUT I need to deploy to a remote server.
Since I connect with terminal services I realized I can select my local hard drive when I connect and then in explorer on the remote server i can open \\tsclient\S\MyWebsite on the remote server.
I then use synctoy with that path and synchronize it with my server. Seems to work pretty well and fast so far...
Maybe rsync plus some custom scripts will do the trick.
Try repliweb. It handles full rollback to previous versions of files. I've used it whilst working for a client who demanded its use and I;ve become a big fan of it, partiularily:
Rollback to previous versions of code
Authentication and rules for different user roles
Deploy to multiple environments
Full reporting to the user via email / logs statiing what has changed, what the current version is etc.

Resources