7

Does anyone know a way to pass command line parameters to virtualized programs inside an XP Mode VM?

I have a VM with Internet Explorer6 installed (and another with Internet Explorer7), and using the shortcut publishing functionality I can launch those from the host OS (Windows 7). But I don't want to just launch them, I want command line parameters to them.

The end goal here is that I want to use a Firefox Extension provide "View in Internet Explorer6", "View in Internet Explorer7" and "View in Internet Explorer8" context menus for a page. The native one is easy, as it would just call "iexplorer.exe %1" where %1 is replaced with the current URL, like any old shortcut. It's passing to the VM apps that's tricky...

I tried just adding another parameter to the shortcut I have (which launches VMSal.exe) but that doesn't work...

studiohack
  • 13,468
  • 19
  • 88
  • 118
  • Normally, adding a parameter to the shortcut should work, I think. Adding another programm launch maybe isn't the best idea, the command may get stuck on the first program. – Michael K May 17 '11 at 08:13
  • You could write the parameters to a file in each respective VM's hard drives via network shares, then place a script that reads the file on the VM's hard drive and calls the VM's iexplore with those arguments. Publish shortcuts to the scripts then instead of iexplore directly. – Huckle Feb 05 '12 at 01:10

2 Answers2

1

Either pass it on through a VBscript, start cmd and run it there or use a batch file in XP mode.

VMSal.exe does not support parameter passing...

Glorfindel
  • 4,089
  • 8
  • 24
  • 37
Tamara Wijsman
  • 57,083
  • 27
  • 185
  • 256
-1

Manually publish the VM using a script with the following parameters:

"CommandLineSetting": 2[Always Require]
"RequiredCommandLine": Param1 Param2 works

Follow: Publishing Virtual Applications in Windows Virtual PC

phuclv
  • 26,555
  • 15
  • 113
  • 235
Ujjwal Singh
  • 2,298
  • 1
  • 23
  • 27
  • [link-only answers are terrible](https://meta.stackexchange.com/q/8231/230282), and as you can already see, the link has already rotten, making the answer invalid. The content is also difficult to understand with that formatting, especially when there's no link to read – phuclv Sep 17 '22 at 08:28