Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Script to create shortcut
Name: Chris (by Chris Kirk) Date: March 4, 2008 at 12:17:48 Pacific OS: XP CPU/Ram: _ Product: _
Comment:
Hello, I would like a script to make a shortcut to programs and to files on users desktop, if this is possible. I would like a VBScript or a different type of script to do this, rafer than manually adding them to each users desktop. Not sure how do this as I am new to scripting. Any Help, Thanks
Name: Jennifer SUMN Date: March 4, 2008 at 12:21:55 Pacific
Reply:
Are you running a Domain with AD?
Life's more painless for the brainless.
0
Response Number 2
Name: Chris (by Chris Kirk) Date: March 4, 2008 at 12:28:20 Pacific
Reply:
No it is just local, and workgroup, so i just want to add them to start ups (in the start menu), some on On all users, some on shared profile, and other just for the that user on the PC.
Also if it could also allow me pick the icon that displays on the shortcut. Thanks
0
Response Number 3
Name: Michael J (by mjdamato) Date: March 4, 2008 at 14:16:30 Pacific
Reply:
Here is some code in one of my VBScripts that creates a shortcut:
'Create environment variables Dim WSHShell, DesktopPath Set WSHShell = WScript.CreateObject("WScript.Shell") DesktopPath = WSHShell.SpecialFolders("Desktop")
'Define the shartcut targets and names Dim shortcutTarget32: shortcutTarget32 = target32 & "\executable.exe" Dim shortcutPath32: shortcutPath32 = DesktopPath & "\" & shortcutName32 & ".lnk"
Dim Shortcut32, StartupPath32 Set Shortcut32 = WSHShell.CreateShortcut(shortcutPath32) Shortcut32.TargetPath = shortcutTarget32 StartupPath32 = objFSO.GetParentFolderName(shortcutTarget32)
If objFSO.FolderExists(StartupPath32) then Shortcut32.WorkingDirectory = StartupPath32 End If
Shortcut32.Save
Michael J
0
Response Number 4
Name: Derek Date: March 4, 2008 at 20:08:33 Pacific
Reply:
I don't know the background to your request but another way is to create a shortcut inside a Windows Explorer folder, then use a batch file to place that shortcut on the desktop when required.
Summary: I'd like to create a script that creates a folder based on the date. My server copies a file to my workstation every Friday night. I'd like to have a script that runs every Saturday that creates the 0...
Summary: Hey guys I'd like a script that scans a folder (and all subfolders) for video files and creates an ASX playlist of the results. Alternatively a script that scans the windows media player library, retu...