Windows 7 Forums


Windows 7: Shortcut with 2 commands

05 Mar 2013  
rdwray

Windows 7 Home Premium 64
153 posts
 
 
Shortcut with 2 commands

Is it possible to run more than one batch file command in a shortcut? I have tried a couple of thins and they did not work.

Example:
Code:
cmd /c start program
cmd /c start another program


My System SpecsSystem Spec

05 Mar 2013  
Thorsen

Win7 Home Premium 64x
3,386 posts
 
 

I don't think you can put two commands in one shortcut, but you could write a simple batch file to call both programs and shortcut to that batch file.

Or if I'm not following right, are you saying you can't write a batch file that calls two programs?

Either way, check out this thread: Batch Files - Start Multiple Programs At Once
My System SpecsSystem Spec
05 Mar 2013  
rdwray

Windows 7 Home Premium 64
153 posts
 
 

I didn't think it was possible. My goal was to keep the command window out of view. I tried using a shortcut set to open the window minimized, but that 2 files as you indicated. Oh well... thanks anyway.
My System SpecsSystem Spec
.


05 Mar 2013  
Ztruker

Windows 7 Pro X64
3,616 posts
Space Coast of Florida
 
 

You can & them together perhaps:

cmd /c start program & start another program
My System SpecsSystem Spec
05 Mar 2013  
rdwray

Windows 7 Home Premium 64
153 posts
 
 

Quote   Quote: Originally Posted by Ztruker View Post
You can & them together perhaps:

cmd /c start program & start another program
Never thought of that, IT WORKS, thanks....
My System SpecsSystem Spec
05 Mar 2013  
carwiz

Windows 7 Pro-x64
1,907 posts
South Texas
 
 

Quote:
cmd /c start program & start another program
You can use multiple commands separated by the command separator && for string, but you must enclose them in quotation marks (for example, "command&&command&&command").

You can run a batch file that will execute as many programs as you want. Use the Echo Off to keep the batch file "silent". If you must use the CMD command, use /k and /q parameters to run and continue and echo off respectively.

Forgot to add the link to the CMD syntax. http://technet.microsoft.com/en-us/l.../bb490880.aspx
My System SpecsSystem Spec
05 Mar 2013  
rdwray

Windows 7 Home Premium 64
153 posts
 
 

The reason I was avoiding "/k" is that the command window stays open.
My System SpecsSystem Spec
Reply

 Shortcut with 2 commands problems?



Thread Tools



Similar help and support threads for: Shortcut with 2 commands
Thread Forum
Solved Correct DOS commands might help Backup and Restore
Solved Bat commands.. General Discussion
Commands not recognized Software
Shortcut commands? Gaming
Commands in Windows 7 Tutorials


All times are GMT -5. The time now is 01:49 AM.



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