I have a Virtual Machine in Virtual PC 2007.
To start it from the desktop, I have the following command in a batch file:
"c:\program files\Microsoft Virtual PC\Virtual PC.exe" -pc "MY-PC" -launch
But that leaves a dos prompt on the host machine until the virtual machine shuts down, and I exit out of the Virtual PC console. That's annoying.
So I changed my command to use the START command, instead:
start "c:\program files\Microsoft Virtual PC\Virtual PC.exe" -pc MY-PC -launch
But it chokes on the parameters passed into Virtual PC.
START /?
indicates that parameters do indeed go in that location. Has anyone used START to launch a program with multiple command-line arguments?
You can use quotes by using the [
/D"Path"
] use/D
only for specifying the path and not the path+program. It appears that all code on the same line that follows goes back to normal meaning you don't need to separate path and file.or:
will start IE with default web page.
starts with Bing, but does not reset your home page.
/D
stands for "directory" and using quotes is OK!WRONG EXAMPLE:
gives:
/D
must only be followed by a directory path. Then space and the batchfile or program you wish to start/runTested and works under XP but windows Vista/7/8 may need some adjustments to UAC.
-Mrbios
have you tried:
?
Instead of a batch file, you can create a shortcut on the desktop.
Set the target to:
and you're all set. Since you're not starting up a command prompt to launch it, there will be no DOS Box.
Put the command inside a batch file, and call that with the parameters.
Also, did you try this yet? (Move end quote to encapsulate parameters)
If you want passing parameter and your .exe file in test folder of c: drive
start "parameter" "C:\test\test1.exe" -pc My Name-PC -launch
If you won't want passing parameter and your .exe file in test folder of c: drive
start "" "C:\test\test1.exe" -pc My Name-PC -launch
If you won't want passing parameter and your .exe file in test folder of H: (Any Other)drive
start "" "H:\test\test1.exe" -pc My Name-PC -launch
If you must use double quotation mark at any parameter, you can get error "'c:\somepath' is not recognized a an internal or external command, operable program or batch file". I suggest below solution when using double qoutation mark: https://stackoverflow.com/a/43467194/3835640