Funky2000 Posted January 12, 2009 Share 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. Link to comment Share on other sites More sharing options...
Mijzelf Posted January 12, 2009 Share Posted January 12, 2009 Maybe this helps? Link to comment Share on other sites More sharing options...
Funky2000 Posted January 12, 2009 Author Share 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 Link to comment Share on other sites More sharing options...
gunsmokingman Posted January 13, 2009 Share Posted January 13, 2009 Perhaps this Link might help. Link to comment Share on other sites More sharing options...
Outbreaker Posted January 13, 2009 Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now