Pass parameters via command line argument to .exe
2014-01
How can I pass parameters from cmd prompt ?? I am trying to follow the following instructions:
For information about usage and parameters, simply run PGRIdleStateFix from the command prompt.
The parameters are:
disable
-Disables all processor sleep states
enable
-Enables processor sleep states
print
-Prints the current status of processor sleep states
Open a command prompt (Windows+R, type "cmd" and hit enter). Then change to the directory housing your executable ("cd enter-your-directory-here"), and run the command with the parameters.
If you'd like to do it via the menu shortcut (assuming installing that utility adds a start menu shortcut), navigate to the menu item, but instead of clicking it, right-click and select properties. At the end of the "Target:" field, add your parameter.
First type the program name, then the parameters separated with spaces. For example:
MyCommand param1 param2 param3
To run the command prompt press Win+R, then type cmd
and press Enter. To change directory, type cd DirectoryName
(you can use relative directories, ..
is the parent directory). To change current drive, type its letter, for example D:
.
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...
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...
Manual Publishing using a script having parameters: "CommandLineSetting": 2[Allways Require] and "RequiredCommandLine": Param1 Param2 works; follow: http://blogs.technet.com/b/windows_vpc/archive/2009/11/02/publishing-virtual-applications-in-windows-virtual-pc.aspx