Funky2000 Posted January 12, 2009 Posted January 12, 2009 Windows Vista and UAC mean that some of the programs that I have need to be run with Administrator priviledge elevation, this can be done, either by changing the .exe permission to be "always Run as Administrator", right click on the exe and choose run as admin or have a shortcut and set the property of the shortcut to "Run As Admin". I am creating shortcuts for these programs using VBScript. Windows Vista has an additional property tab for shortcuts (.lnk) labelled Compatibility. there is a tick box on there that will Run the target program as administrator. What I am asking here: Is there a way to create a shortcut with this tick box enabled within VBScript ??I can post details of the script that creates the shortcut if need be, but its just a standard vbscript file.
Funky2000 Posted January 12, 2009 Author Posted January 12, 2009 Maybe this helps?That's great, thanks Mizjelf, however I was looking for a VBScript method for doing this, that link isn't for VBScript
Outbreaker Posted January 13, 2009 Posted January 13, 2009 I use this script:Dim Act,colEnvironmentVariables, objShortCut, Shell Set Shell = CreateObject("WScript.Shell") Set colEnvironmentVariables = Shell.Environment("Volatile") Set Act = CreateObject("Wscript.Shell") Set objShortCut = Shell.CreateShortcut(Act.ExpandEnvironmentStrings("%UserProfile%\Desktop\Windows Media Player.lnk")) objShortCut.TargetPath = Act.ExpandEnvironmentStrings("%ProgramFiles%\Windows Media Player\wmplayer.exe") objShortCut.Arguments = " /prefetch:1" objShortCut.WorkingDirectory = Act.ExpandEnvironmentStrings("%ProgramFiles%\Windows Media Player") objShortCut.Description = "Play digital media including music, videos, CDs, and DVDs." objShortCut.Save
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now