1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Bug in shortcut command

Discussion in 'Support' started by ebbe, Jun 4, 2008.

  1. ebbe

    Joined:
    Jun 2, 2008
    Messages:
    31
    Likes Received:
    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
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,351
    Likes Received:
    39
    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
    
     
  3. ebbe

    Joined:
    Jun 2, 2008
    Messages:
    31
    Likes Received:
    0
    Thanks. I had completely overlooked that :o
     

Share This Page