Important Update – 28 Jan 2009
A comment was posted to my December 22 post stating that the Elevate command in the Elevation PowerToys does not work correctly in the Windows 7 Beta. (Thanks Pete!) The application is launched elevated but the arguments are not passed to the application. It turns out that this is caused by a known bug in the Windows 7 Beta. The ShellExecute method of the Shell Scripting Objects does not pass the vArguments parameter when it is stored in a variable.
I had previously attached a VBScript that used the Execute statement to pass the ShellExecute parameters as literal strings as a workaround. While that worked for the particular case from the blog post, it broke others because I cannot predict the quoting that will be passed in to form a valid VBScript string.
However, as luck would have I found another workaround in the bug notes. If you append a blank string to the variable in the ShellExecute parameter list (i.e. passing an expression as the ShellExecute vArguments parameter) it works. I’ve attached an new updated version of Elevate.vbs that has the new workaround. Please give this a try if you are using the Elevation PowerToys with Windows 7. Simply replace the version in the Elevation PowerToys download with this one and reinstall the Elevate Command PowerToy using ElevateCommand.inf.
This post was contributed by Michael Murgolo, a Senior Consultant with Microsoft Services – U.S. East Region.