Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Mar 2001
    Location
    UK
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arguments in shortcuts

    Hi
    Can someone please tell me the correct syntax for adding an argument to the Target box in a Windows shortcut. I need to add a path to an .ini file after the path to the .exe

    Many thanks

  2. #2
    Silver Lounger
    Join Date
    Apr 2001
    Location
    New York, New York, USA
    Posts
    2,328
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Arguments in shortcuts

    There is none. Just <Path>executable.exe (space) <Path>settings.ini
    If your exec allows command-line path to INI, of course.

  3. #3
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Brantford, Ontario, Canada
    Posts
    2,391
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Arguments in shortcuts

    We have some software that requires the path to the ini file be preceeded with an "=".

    eg. C:LotusNotesnotes.exe =c:Lotusnotesnotestemp.ini
    Christopher Baldrey

  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Arguments in shortcuts

    Don't forget if your path or the name of the file have spaces in it, you have to put it in quotes
    eg. "C:My Documentsexecutable.exe" "C:My Documentssettings.ini"
    Francois

  5. #5
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    England
    Posts
    1,306
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Arguments in shortcuts

    Guys:
    This works as expected :
    E:WINDOWSsystem32cmd.exe /k C:BatchESC4.bat

    but this doesn't :
    E:WINDOWSsystem32cmd.exe C:BatchESC4.bat

    nor does either of them if quotes are used.

    /k seems to have some use...

    Rgds

  6. #6
    Silver Lounger
    Join Date
    Apr 2001
    Location
    New York, New York, USA
    Posts
    2,328
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Arguments in shortcuts

    CMD.EXE is a command interpreter is a program that displays the command prompt at which you type commands.
    Syntax:
    cmd [ [/c | /k] [/q] [/a | /u] [/t:fg] [/x | /y] string]

    Parameters

    /c
    Carries out the command specified by string and then stops.

    /k
    Carries out the command specified by string and continues.

    /q
    Turns the echo off.

    /a
    Creates ANSI output.

    /u
    Creates Unicode output.

    /t:fg
    Sets the foreground and background colors.

    /x
    Enables extensions to the Windows 2000 version of Cmd.exe, to provide a richer shell programming environment. The following commands use the extensions: del (erase), color, cd (chdir), md (mdir), prompt, pushd, popd, set, setlocal, endlocal, if, for, call, shift, goto, start, assoc, and ftype. For details, see the Help for each command.

    /y
    Disables extensions to the Windows 2000 version of Cmd.exe, for backward compatibility reasons. The extensions are enabled by default.

    string
    Specifies the command you want to carry out.


    For more information, see <A target="_blank" HREF=http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/ntcmds.htm>Windows 2000 Server Documentation</A>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •