VBS script for creating Windows Shortcuts (lnk)

Last Modified: Fri, 24 Apr 2009 17:14:27 +0000 ; Created: Fri, 24 Apr 2009 17:14:27 +0000

Save the following into a file with the extension vbs or wsh with the appropriate edits:
'Create a WshShell Object
Set WshShell = Wscript.CreateObject("Wscript.Shell")

'Create a WshShortcut Object
Set oShellLink = WshShell.CreateShortcut("aaa.lnk")

'Set the Target Path for the shortcut
oShellLink.TargetPath = "notepad.exe"

'Set the additional parameters for the shortcut
oShellLink.Arguments = "c:\windows\desktop\aaa.txt"

'Save the shortcut

'Clean up the WshShortcut Object
Set oShellLink = Nothing