GET-IT: TEAMS DAY | 1-Day Free Virtual Conference all about Teams. Here on Petri.com - 8/12/20 GET-IT: TEAMS DAY - 8/12/20

set privilege level to shortcut using VBS

Home Forums Scripting Windows Script Host set privilege level to shortcut using VBS

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    XtaZee
    Member
    #148976

    Hi,
    I have a similar code to this one, it will create a shortcut, what I need is to enable the “run this program as an administrator “:

    Code:
    set WshShell = WScript.CreateObject(“WScript.Shell” )
    strDesktop = WshShell.SpecialFolders(“AllUsersDesktop” )
    set oShellLink = WshShell.CreateShortcut(strDesktop & “Windows Explorer.lnk” )
    oShellLink.TargetPath = “%SYSTEMROOT%explorer.exe”
    oShellLink.WindowStyle = 1
    oShellLink.IconLocation = “%SystemRoot%explorer.exe”
    oShellLink.Description = “Windows Explorer”
    oShellLink.WorkingDirectory = “%HOMEPATH%”
    oShellLink.Save

    thanks!

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.