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?
"/b" parameter
start /b "" "c:\program files\Microsoft Virtual PC\Virtual PC.exe" -pc "MY-PC" -launch
Change The "Virtual PC.exe" to a name without space like "VirtualPC.exe" in the folder. When you write
start "path"
with "" the CMD starts a new cmd window with the path as the title. Change the name to a name without space,write this on Notepad and after this save like Name.cmd or Name.bat:This command will redirect the CMD to the folder,start the VirualPC.exe,wait 2 seconds and exit.
The answer in "peculiarity" is correct and directly answers the question. As TimF answered, since the first parameter is in quotes, it is treated as a window title.
Also note that the Virtual PC options are being treated as options to the 'start' command itself, and are not valid for 'start'. This is true for all versions of Windows that have the 'start' command.
This problem with 'start' treating the quoted parameter as a title is even more annoying that just the posted problem. If you run this:
You get a new command prompt window, with the obvious result for a window title. Even more annoying, this new window doesn't inherit customized font, colors or window size, it's just the default for cmd.exe.
START has a peculiarity involving double quotes around the first parameter. If the first parameter has double quotes it uses that as the optional TITLE for the new window.
I believe what you want is:
In other words, give it an empty title before the name of the program to fake it out.
The spaces are DOSs/CMDs Problems so you should go to the Path via:
and then simply start VPC via:
~1
means the firstexe
with"Virtual"
at the beginning. So if there is a"Virtual PC.exe"
and a"Virtual PC1.exe"
the first would be theVirtual~1.exe
and the secondVirtual~2.exe
and so on.Or use a VNC-Client like VirtualBox.