Hey guys, trying to dynamically create a shortcut in the start menu but failing misserably... point is to start this link during our OSD for Windows 7....for all intensive purposes, it should work, but wont display the link in the all users.... ideas?
' Initialization
Program = "SetStart.vbs"
Set shell = CreateObject("Wscript.Shell")
' Create the shortcut and point it to the specified script (assume C:\Build)
' path = shell.SpecialFolders("ProgramData") & "C:\Profiles\Profiles\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" & "\Startup.lnk"
path = "C:\Users\All Users\Microsoft\Windows\Start Menu\Programs\Startup" & "\Startup.lnk"
Set link = shell.CreateShortcut(path)
link.TargetPath = "C:\Build\" & WScript.Arguments.Item(0) ' Name of the file to start
If WScript.Arguments.Count > 1 then
plog "Link = " & WScript.Arguments.Item(1)
link.Arguments = WScript.Arguments.Item(1) ' Parameters to pass
End if
link.Save
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Hey guys, trying to dynamically create a shortcut in the start menu but failing misserably... point is to start this link during our OSD for Windows 7....for all intensive purposes, it should work, but wont display the link in the all users.... ideas?
Share this post
Link to post
Share on other sites