Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shortcut in Startup

Status
Not open for further replies.

Abey

Technical User
Feb 27, 2002
1
US
I'm trying to create a shortcut with parameters in the Startup folder. However, I can't seem to get the " marks to appear in the right places. Must run on 98/ME/NT4/2000 & XP.

Tried all sorts of variations of:
' Create a shortcut object in the Startup folder
Set MyShortcut = WshShell.CreateShortcut(StartupPath & "\ServiceMgr.lnk")

' Set shortcut object properties and save it
MyShortcut.TargetPath = CmdPath & "scm.exe" & " -Action 1 - Server -Service MSSQLServer"
MyShortcut.WorkingDirectory = CmdPath
MyShortcut.WindowStyle = 4
MyShortcut.IconLocation =CmdPath & "scm.exe, 0"
MyShortcut.Save

I get a Shortcut, but I can't seem to get the target right.
Thanks,

 
use the specialfolders property

strStartup = WshShell.SpecialFolders("startup")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top