Some programmers are asking why their Restore Point Creator Program written in Vb.Net/C# doesn't work in Windows Vista. It will not work because of UAC. To run the program, you must open or launched it as administrator.
The same way with VB Script programming in Windows Vista. I wrote a simple alternative way to launch scripts as Administrator.
Here:
If WScript.Arguments.Count > 0 Then 'Your VB Script CODE here Else Set objLaunch = CreateObject("Shell.Application") |
It will elevate the script before launching your code.
Read more: Universal Script Template in Elevating Commands as Administrator in Windows Vista
Easy? Enjoy!
More Articles:
How to Get the Windows Experience Index (WEI) score of a Network Computer
No comments:
Post a Comment