Passing command line parameters to VM-based programs


  • I'm trying to figure out how to pass a command line parameter to a program inside the XP Mode VM. I haven't been able to find out much info about this, so I thought I'd ask you guys.

    More specifically, I want to pass command line parameters to Internet Explorer 6 to tell it to open a URL. The URL can be arbitrary so I can't simply create a batch file to load IE w/ a predefined site or anything like that.

    (The end goal here is to use this Firefox extension: to have the following context menus:
    • Open Page in IE6 (will open the current page in VM copy of IE6)
    • Open Page in IE7 (ditto, but for IE7 in a different VM image)
    • Open Page in IE8 (native IE8 in win7)

    Any ideas?

    Thanks for any insight you can provide on this.
    2009년 9월 21일 월요일 오후 10:07

모든 응답

  • Check the help in the Programming language you use to see how to pass parameters to a program. To call a program in a VM from the host will be impossible I think.
    2009년 9월 22일 화요일 오전 2:43
  • If the idea is to launch the commandline to start the app as a virtual app, you can publish cmd.exe (make a shortcut to cmd.exe in %allusersprofile% \start menu inside the vm) from the vm. Now, launch the published cmd.exe, and you can launch just about any app installed in the vm, this should give you the flexibility to launch the programs with comandlines that will run as other virtual apps.
    Thanks, Rashmi U.R
    • 답변으로 표시됨 Russell Weed 2009년 9월 24일 목요일 오후 7:56
    • 답변으로 표시 취소됨 Russell Weed 2009년 9월 24일 목요일 오후 7:57
    2009년 9월 22일 화요일 오후 7:02
  • Wouldn't that would just open up a command prompt and I'd have to type in what I wanted? Not really what I had in mind.

    Instead of the VM just loading "iexplorer.exe" I want it to load "iexplorer.exe" or maybe "iexplorer.exe". The site would be completely arbitrary as the goal is for web site testing. I want to be on any particular page of a site and be able to right-click and launch that same URI into IE6,7, or 8. Does this make sense?

    Virtual PC is smart enough to load up the VM then launch a specific process, so I wouldn't think that it'd be that much harder to throw pass parameters into that process as well. I mean it's certainly less complicated than the stuff it already does like device and clipboard sharing...
    2009년 9월 24일 목요일 오후 8:05
  • Don't suppose anyone has any more experience with this now that Win7 final is out?

    I noticed that File Associations work between the host and the VM, and it seems to launch them using OpenWithProgids. Is there any way this could be leveraged to do what I want?
    2009년 10월 30일 금요일 오후 8:59
  • You should create shortcut for you program and command line in VM and publish it on host. This should work.
    Thanks, -Vinod -- "This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use."
    • 답변으로 제안됨 Ujjwal Singh 013 2012년 3월 1일 목요일 오후 4:46
    2010년 2월 18일 목요일 오전 4:47
  • Yes quite like this: but it can only be achieved programmatically : look under: "Manual Publishing". Customize the give VB Script as per your need. It has a field for 'Command Lines'.

    2012년 3월 1일 목요일 오후 4:49