How to add parameter to run command keyboard shortcut


  1. Posts : 34
    Windows 7 Professional 64
       #1

    How to add parameter to run command keyboard shortcut


    Thanks to the SevenForums tutorial at:

    Run Command - Create Shortcut

    I know how to create a desktop shortcut for the run command, and can pin it to the taskbar.

    I thought I could add a parameter by clicking on the end of the Target line in the shortcut's properties:

    %windir%\explorer.exe shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}

    and typing in the parameter I want (in this case, firefox.exe, with a switch to load a profile from a specific folder.)

    Unfortunately, that's not working as I had hoped. With or without the parameter, I still get the Run command prompt window telling me to:

    Type the name of a program, folder, document or Internet resource, and Windows will open it for you.

    I'd like to bypass this window, and have the shortcut load Firefox with the specified profile.

    Can anyone tell me how to do this?
      My Computer


  2. Posts : 72,046
    64-bit Windows 11 Pro for Workstations
       #2

    Hello Adams,

    If you like, you should be able to create a shortcut for the program you want to run instead to do this. :)
      My Computer


  3. Posts : 34
    Windows 7 Professional 64
    Thread Starter
       #3

    Thanks for the response, Brink. I was able to make a shortcut to firefox.exe, but not with the parameter I need. Even adding the -p switch after firefox.exe gives me a 'name specified in the Target box is not valid' error.

    If there's a way to include a parameter in a shortcut, I'm very interested! Otherwise, I'm still stuck.
      My Computer


  4. Posts : 5,092
    Windows 7 32 bit
       #4

    Please post the entire target line as it is in the shortcut.
      My Computer


  5. Posts : 6,285
    Windows 10 Pro X64
       #5

    This is what I do for Seamonkey, which is a derivative (sort of) of Firefox.

    "C:\Program Files (x86)\SeaMonkey\seamonkey.exe" -P Rich

    The -P name is the key.

    For Firefox, it would be

    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -P Name
      My Computer


  6. Posts : 34
    Windows 7 Professional 64
    Thread Starter
       #6

    That put me on the right track, Ztruker; thank you. I couldn't get it to work with just the -p switch -- which kept pulling up the profile manager -- but when I edited the shortcut target line to read:

    "c:\Program Files(x86)\Mozilla Firefox\firefox.exe" -profile "x:\users\myname\AppData\Roaming\Mozilla\Firefox\Profiles\myname.default"

    it consistently worked.

    (For the benefit of anyone wandering across this thread with a similar problem: please note quotes around "c:\Program Files(x86)\Mozilla Firefox\firefox.exe" and "x:\users\myname\AppData\Roaming\Mozilla\Firefox\Profiles\myname.default" but not around -profile between the two.)
      My Computer


  7. Posts : 6,285
    Windows 10 Pro X64
       #7

    I'll have to play with this some time as I only have a single account under Firefox as I use Seamonkey for my browser.

    One thing I'll mention, the -P has to be upper case for SeaMonkey so probably true for Firefox. Glad you got it working.
      My Computer


  8. Posts : 6,285
    Windows 10 Pro X64
       #8

    I just tried it. I created a new account called RichK then modified the Shortcut target to

    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -P RichK

    and it works correctly. -P must be uppercase and the account name has to match.
      My Computer


  9. Posts : 5,092
    Windows 7 32 bit
       #9

    Also you should be able to stick a "%1" on the end to drag urls onto it.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 18:12.
Find Us