From WikiChip
Difference between revisions of "mirc/commands/run"
< mirc‎ | commands

Line 14: Line 14:
 
* '''<file/dir/obj>''' - the object/file to execute
 
* '''<file/dir/obj>''' - the object/file to execute
 
* '''[arguments]''' - arguments list passed to the program
 
* '''[arguments]''' - arguments list passed to the program
 
+
== Notes ==
 +
* If $isadmin indiates mIRC itself is running in an elevated 'run as administrator' state, using /run launches that program in elevated state, even if not using the -a switch.
 +
* Using the -a switch causes the UAC prompt to appear only if $isadmin is $false indicating that mIRC is not running in an elevated state.
 +
* In Win7-32 OS, using the -a switch fails if launching a 16-bit DOS executible, even if mIRC is already running in elevated state. Workaround is to use $isadmin to verify whether the -a switch is needed.
 
== Example ==
 
== Example ==
 
<syntaxhighlight lang="mIRC">alias example {
 
<syntaxhighlight lang="mIRC">alias example {
Line 25: Line 28:
 
== Compatibility ==
 
== Compatibility ==
 
{{mIRC compatibility|2.1a}}
 
{{mIRC compatibility|2.1a}}
 
 
== See also ==
 
== See also ==
* [[List of commands - mIRC|List of commands]]
+
* {{mIRC|$isadmin}}
* [[List of identifiers - mIRC|List of identifiers]]
 
 
* {{mIRC|$url}}
 
* {{mIRC|$url}}
 
* {{mIRC|$file}}
 
* {{mIRC|$file}}
Line 38: Line 39:
 
* {{mIRC|$exists}}
 
* {{mIRC|$exists}}
 
* {{mIRC|/url}}
 
* {{mIRC|/url}}
{{mIRC command list}}
 
 
[[Category:mIRC commands|run command - mIRC]]
 

Revision as of 15:14, 17 November 2019

The /run command executes the given file or object using the application associated with its file extension. It can also be used to open directories. The file parameter can be enclosed by a pair of double quotes to separate it from the argument list.

Synopsis

/run -pnh <file/dir/obj> [arguments]

Switches

  • -h - hide the application in context
  • -p - changes the working path to the path of the application in context
  • -n - minimize the window upon opening
  • -a - run as administrator.

Parameters

  • <file/dir/obj> - the object/file to execute
  • [arguments] - arguments list passed to the program

Notes

  • If $isadmin indiates mIRC itself is running in an elevated 'run as administrator' state, using /run launches that program in elevated state, even if not using the -a switch.
  • Using the -a switch causes the UAC prompt to appear only if $isadmin is $false indicating that mIRC is not running in an elevated state.
  • In Win7-32 OS, using the -a switch fails if launching a 16-bit DOS executible, even if mIRC is already running in elevated state. Workaround is to use $isadmin to verify whether the -a switch is needed.

Example

alias example {
  ; open our site
  run www.zigwap.com/mirc
  ; open notepad, minimized
  run -n notepad.exe
}

Compatibility

Added: mIRC v2.1a
Added on: 28 Feb 1995
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.

See also