Solved How to add parameter to run command keyboard shortcut

Adams Seven

New member
Member
Local time
10:45 AM
Messages
34
Thanks to the SevenForums tutorial at:

http://www.sevenforums.com/tutorials/21246-run-command-create-shortcut.html

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

OS
Windows 7 Professional 64
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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
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

OS
Windows 7 Professional 64
Please post the entire target line as it is in the shortcut.
 

My Computer

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
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

OS
Windows 7 Professional 64
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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Lenovo IdeaCenter 450
OS
Windows 10 Pro X64
CPU
Intel Quad Core i7-4770 @ 3.4Ghz
Memory
16.0GB PC3-12800 DDR3 SDRAM 1600 MHz
Graphics Card(s)
Intel Integrated HD Graphics
Sound Card
Realtek HD Audio
Monitor(s) Displays
HP 22" LCD
Screen Resolution
1680 x 1050
Hard Drives
250GB Samsung EVO SATA-3 SSD
2TB Seagate ST2000DM001 SATA-2
1.5TB Seagate ST3150041AS SATA
Keyboard
Dell USB
Mouse
Lenovo USB
Internet Speed
Cable via Road Runner 3MB Upload, 30MB Download
Antivirus
Windows Defender, MBAM Pro, MBAE
Browser
Seamonkey
Other Info
UEFI/GPT
PLDS DVD-RW DH16AERSH
Also you should be able to stick a "%1" on the end to drag urls onto it.
 

My Computer

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
Back
Top