>Thanks George.
>Nevertheless at the programs I have oLnk.TargetPath = cDesktopDir + "\\notepad.lnk" and this don't work.
>How should be the runtime...?
>TIA
Andrews,
Apparently yesterday I hit preview and neglected to send my message.
The following works fine:
oShell = CREATEOBJECT(“WScript.Shell”)
lcdesktop = oShell.SpecialFolders(“Desktop”)
oLink = oShell.CreateShortcut(lcdesktop + “\Shortcut to Notepad.lnk”)
oLink.TargetPath = "C:\Windows\Notepad.exe"
oLink.IconLocation = "C:\Windows\Notepad.exe"
oLink.WorkingDirectory = "C:\Windows"
oLink.WindowStyle = 3
oLink.Arguments = “”
oLink.Hotkey = “”
oLink.Save()
The above is paraphrased from the series on the Windows Script Host that Ed Rauh and I wrote for VFUG (
www.vfug.org). This is from the second article which appeared last October. The entire series is available on-line at the site.
George
Ubi caritas et amor, deus ibi est