Program/Parameters

parameters

 

The Program/Parameters edit-field is a multi-functional control, where you can enter different types of information:

 

1. Parameter switches for a watched program:

 

Parameter switches are switches passed to a program to control its functionality. For example, many console programs support the -h or /? parameter switch to show a short usage documentation. Example:

 

at-exe-example

 

With this example, check one of these two checkboxes checkbox-capture-output or checkbox-keep-console-window-open and then hit the RUN button. You can then watch the output of the at.exe help text either in the console window or in the Output tab respectively.

 

2. Parameter files for a watched program:

 

A Parameter file is a (document) file passed to a program. The program then processes this file or opens this document file. When you insert an existing parameter file into this Program/Parameters edit-field (e.g. by Drag&Drop) then PA-RUN shows a small preview of the file:

 

param-file-preview

 

In the above example, when clicking the RUN button the popular PDF viewer Acrobat Reader is being executed (and watched). This program then loads the document file documentation.pdf.

 

Note: When you drag&drop a file which is not a program (e.g. a document file) anywhere on the Program tab of the main window then this file will automatically be inserted in this Program/Parameters edit-field.

 

3. Execute a Program (without watching it) in the same way as "Windows Run":

 

If you insert an existing program into the Program/Parameters edit-field the program icon is displayed:

 

notepad-in-params-edit

In the above example, when you hit the ENTER/RETURN key (or double-click on the program icon) the Windows notepad program is executed.

In this case the full file path (C:\Windows\system32\notepad.exe) is not needed because Windows knows that notepad.exe is located in the C:\Windows\system32 directory.

 

In the same way you can add a parameter to this commandline:

notepad-in-params-edit-with-param

In the above example, the Windows notepad program is executed. Notepad then loads the existing document file R:\test.txt.

 

Try to add the "/A" switch (open the text file in ANSI mode) or the "/W" switch (open the text file in UNICODE mode) and see the result in each case:

notepad-in-params-edit-with-param-and-switch

 

When you execute a program from the Program/Parameters edit/field the main PA-RUN program window is automatically minimized to the Tray Icon. You can restore the main PA-RUN program window by clicking on the Tray Icon or by pressing the global PA-RUN shortcut.

 

Note: When you drag&drop a program file anywhere on the Program tab of the main window while the CONTROL key is pressed then this program file will automatically be inserted in this Program/Parameters edit-field (instead of the default Program watch edit-field).

 

4. Open a document file in the associated program in the same way as "Windows Run":

 

If you insert an existing document file into the Program/Parameters edit-field the document icon is displayed:

document-file

In the above example, when you hit the ENTER/RETURN key (or double-click on the TXT icon) the test.TXT file is opened in its associated program.

 

A right-click on this Program/Parameters edit-box brings up the same popup-menu as a left-click on its right-hand button edit-button

 

You can drag a parameter file e.g. from Windows Explorer and drop it anywhere on the PA-RUN Program page to have it automatically entered into the Program/Parameters edit-field.

 

Move text between edit-fields: You can easily and quickly move text between this Program/Parameters edit-field and the Program Watch edit-field by clicking the buttons between these two edit-fields:
  button-movetext

 

If the Program/Parameters edit-box contains a single filepath of an existing file then the file's thumbnail image is displayed on the left side of the Parameters edit-box:

 

parameters-file-thumbnail

 

This thumbnail works in the same way as the file itself:

 

You can DRAG & DROP this thumbnail to Windows Explorer or to a cloud-folder in the web-browser (e.g DropBox, Google Drive, etc.) to copy the file to the Drop-destination. If hold down the ALT key while dropping the file in Windows Explorer a shortcut .LNK file will be created instead.

 

Double-clicking this thumbnail opens the file in its default program.

 

Also, right-clicking this thumbnail invokes the popup-menu of the Parameters edit-box.

 

Additionally, on the right side of the Parameters edit-box the file-format description of the parameter file is displayed:

 

filetype-description

 

Normally, when passing a file as parameter to a program on the command-line, a file path containing spaces must be enclosed in quotes, for example:

"C:\My Files\folder with many spaces\My File.txt"

PA-RUN does not require you to do this, EXCEPT when there is a file-path containing spaces AND other parameters in the "Program/Parameters" edit-field, for example:

param-filepath

 

exclamation-blue When you press the ENTER/RETURN key in the "Program/Parameters" edit-field to open a program directly or indirectly then it is possible that the following message appears:

    msg-requireselevation

   This message informs you that the program you want to start requires higher privileges. In this case you can either:

    • Check the Run as Administrator checkbox: checkbox-runas-admin (which is faster). This will present you the Windows UAC prompt which you need to confirm.

    • Click on the elevation button shield-icon-blue in the status-bar to restart PA-RUN with Administrator privileges. Then you can start all programs from PA-RUN without getting elevation messages or having to confirm any UAC prompt.

 

See also:

Parameters Button