Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Bug in shortcut command

Jun
40
0
Hi Rex

When I execute this command:

shortcut "F:\JPSoft\4nt.exe /c F:\eject.cmd" ... (see below for full command)

the target in the shortcut is set to (literally):

"F:\JPSoft\4nt.exe \c F:eject.cmd"

There are several things wrong here:

- The quotes enclose the whole command which makes Windows thoroughly confused when I double-click the shortcut.

- The forward slash on the "/c" option is changed to a backslash.

- The backslash in the path to eject.cmd is removed.

Full command (on one line):

shortcut "F:\JPSoft\4nt.exe /c F:\eject.cmd" "" "F:\" "Eject USB-key" "C:\Documents and Settings\c2441g1\Desktop\Eject USB-key.lnk" 2 "C:\WINDOWS\system32\SHELL32.dll" 26

Ebbe
 
Hi Rex

When I execute this command:

shortcut "F:\JPSoft\4nt.exe /c F:\eject.cmd" ... (see below for full command)

the target in the shortcut is set to (literally):

"F:\JPSoft\4nt.exe \c F:eject.cmd"

Ebbe

Note that the filename to execute and its arguments constitute two separate arguments to the SHORTCUT command. You need to put each in double quotes:

Code:
shortcut "F:\JPSoft\4nt.exe" "/c F:\eject.cmd" "F:\" "Eject USB-key" "C:\Documents and Settings\c2441g1\Desktop\Eject USB-key.lnk" 2
 

Similar threads

Back
Top