Skip to content

Zalexanninev15/RunAdminCMD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RunAdminCMD | Latest release

Description

Utility for running files/scripts/apps as Administrator. Created to quickly grant Administrator rights to BAT/CMD files and other apps

Show the utility version:

RunAdminCMD -v

Features

  • Quickly grant Administrator rights
  • Interesting (in some ways unique) settings for better working with the utility. You can start the files/scripts/apps and arguments to them "in old way" or run them from the list.txt file, as well as combine them all

System requirements

  • OS: Windows 7 or higher
  • Additional: .NET Framework 4 or higher

How to interact?

Simple use:

- Run for file or app:

RunAdminCMD taskmgr

- Run for scripts or app with argument:

RunAdminCMD explorer.exe C:\Windows\System32

Note: To add support to the BAT/CMD file, you need to insert the element %1 (or more after it to support the arguments in its batch scripts) in the section of the script that should accept it. Here is an example using the "ping" utility in a batch script.

- Run a scripts or apps with arguments

RunAdminCMD PingCMD.bat -t google.com

Note: To add support to the BAT/CMD file, you need to insert the element %1 (or more after it to support the arguments in its batch scripts) in the section of the script that should accept it. Here is an example using the "ping" utility in a batch script.

Extended use (using variables):

- Basics:

  1. In the list.txt file enter the variables with the value needed to start the file/script/app that needs Administrator rights (it is better to just put the desired file in the folder with the utility and just write the file name of this file).

Example, text in the list.txt file:

$ping_app=ping
$ping_arguments=-t google.com
$notepad_app=notepad
$github="I love GitHub"

Note: The dollar sign ($) must be present at the beginning, before the variable name

  1. Run the utility:
RunAdminCMD -f $notepad_app

Notes:

  • After argument -f, write a variable from the list.txt file with the way to the file/script/app you want to run

  • When entering variable(s) when running RunAdminCMD to load a value from list.txt file, you can remove the dollar sign ($). Be sure to put this sign in the list.txt file itself!


- It is also possible to run with an argument(s) (ex: variable from list.txt = $ping_app, argument = -t github.com):

RunAdminCMD -f $ping_app -t github.com

- Run with an argument(s) from the list.txt file (ex. variable from list.txt = $notepad_app, argument = "Hello World"):

RunAdminCMD -f notepad_app "Hello World"

Note: When entering variable(s) when running RunAdminCMD to load a value from list.txt file, you can remove the dollar sign ($). Be sure to put this sign in the list.txt file itself!

- Run with an argument(s) from variable from the list.txt file (ex. variable from list.txt = $notepad_app, argument as variable from list.txt = $github)

RunAdminCMD.exe -f $notepad_app # github

- Run the script or app not from variable and with an argument(s) from variable from the list.txt file (ex: file/script/app = your value :), argument as variable from list.txt = $ping_arguments)

RunAdminCMD.exe PingCMD.bat # ping_arguments

Note: To add support to the BAT/CMD file, you need to insert the element %1 (or more after it to support the arguments in its batch scripts) in the section of the script that should accept it. Here is an example using the "ping" utility in a batch script.

Build

Compile using SharpDevelop or Visual Studio