Monday, February 10, 2014
How to Make a Shortcut for a .Jar in VBS
1. Click the Windows 'Start' button and type 'notepad' in the search text box. Press 'Enter' to open the editor.
2. Create the variable for the Windows shell program, which you use to set up Windows settings from VBS. The following code sets up the shell variable and the link variable:Set shell = WScript.CreateObject('WScript.Shell')
link= 'C:\jar.LNK'
3. Create the link on the desktop. The following code creates the file on the computer:Set link= shell.CreateShortcut(link)
4. Set up the shortcut to point to the JAR file. The following code adds the target for the shortcut link:link.TargetPath = 'C:\jarfile.jar'Replace the path with your own JAR path location.
5. Click the 'File' menu item and click 'Save.' In the opened dialog window, type 'jarshortcut.vbs' and click 'Save' to save the VBS file.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment