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:

-Disables all processor sleep states

-Enables processor sleep states

-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.

  • I got it till ("cd enter-your-directory-here"). But how do I run it with the parameters ? ... eg: Disbale setup.exe or enable setup.exe – Rene Duchamp Jul 8 '13 at 21:10
  • PGRIdleStateFix print – petiepooo Jul 8 '13 at 21:29
  • If you cd to the directory and see setup.exe, that tells me you haven't installed the package yet. Running setup.exe will, I assume, install it and give you menu commands for running the program under your Start menu. – petiepooo Jul 8 '13 at 21:30
  • 4
    BTW, I see you haven't selected answers on any of your other questions. If you want to encourage others to answer your questions, please select an answer if you see one that works for you. The currency of this site is reputation, and that's the answerer's reward. – petiepooo Jul 8 '13 at 21:37
  • Man...this one saved my sanity. Was given the unenviable task of updating code from a legacy application and the debug parameter was given in the project properties debug tab, so everything was running fine in debug mode. When it came time to run the .exe, I just double clicked the program and it kept crashing. As soon as i ran the .exe from a command line like this program.exe @, all was right with the world. THANK YOU! – jazzBox Nov 15 '18 at 14:01

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:.


Depends on exe implementation. This is one example for an exe I made with Java and Install4J, but it doesn't really depend on technology.

Myexe.exe --drink Beer --food Chicken

Myexe.exe -d Beer -f Chicken

There might be other implementations like for example @gronostaj example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.