create shortcut vbs script

Richnl

Well-known member
Joined
Mar 20, 2007
Messages
93
Programming Experience
Beginner
I am testing this script in the installer

It works on my desktop, but not in the installer under the commit node in custom actions.

I get the error, cannot execute the script required for the install

??
VB.NET:
         set WshShell = WScript.CreateObject("WScript.Shell")
         strOpstarten = WshShell.SpecialFolders("Startup")
         set oShellLink = WshShell.CreateShortcut(strOpstarten  & "\TrafficAlerter.lnk")
         oShellLink.TargetPath = "C:\Program Files\Streamcast\TrafficLauncher\TrafficAlerter.exe"
         oShellLink.WindowStyle = 3
         oShellLink.IconLocation = "notepad.exe, 0"
         oShellLink.Description = "TrafficAlerter"
         oShellLink.WorkingDirectory = strOpstarten 
         oShellLink.Save


Thanks, Richard
 
Last edited:
Solved, I removed "WScript" in set WshShell = WScript.CreateObject("WScript.Shell"), because the installer does't recognize it.
 
Why use script to create this shortcut? Use the installer facility. Select View FileSystem, Add Special Folder (Users Startup), Create New Shortcut and point it to the primary output in Application folder.
 
Yes, but I wanted to let the user have the option

This was the easiest way I know how to do it

I don't know how to create a condition combined with a checkbox in the way you say I should do it!
 
Last edited:
Back
Top