elevate v1.3.0 - Command Line UAC Elevation Utility *************************************************** * Elevate (elevate.exe 32-bit + elevate.exe 64-bit) 1.3.0 32-bit + 64-bit DOS console tools for Windows Vista/2008/7/8/8.1/2012/10/2016 run any program/process/service/script/batch elevated with Administrator rights, useful for task automation in BATch (.BAT, .CMD) and script (.VBS) files: http://code.kliu.org/misc/elevate/ Direct download [12 KB, freeware]: http://code.kliu.org/misc/elevate/elevate-1.3.0-redist.7z SYNTAX ****** This utility executes a command with UAC privilege elevation. This is useful for working inside command prompts or with batch files. elevate [(-c | -k) [-n] [-u]] [-w] command Options: -c Launches a terminating command processor; equivalent to "cmd /c command". -k Launches a persistent command processor; equivalent to "cmd /k command". -n When using -c or -k, do not pushd the current directory before execution. -u When using -c or -k, use Unicode; equivalent to "cmd /u". -w Waits for termination; equivalent to "start /wait command". Notes: Both the hyphen (e.g., -w) and slash (e.g., /w) forms of switches are valid. When -k is specified, command is optional. Omitting command in this case will simply open an elevated command prompt. Normally, an elevated command processor will not honor the current directory of an unelevated parent process, thus potentially creating problems with relative paths. To address this problem, when the -c or -k switches are used, elevate will issue a pushd command to the new command processor to ensure that it uses the current directory of its parent process. Specifying the -n switch will disable this feature. Examples: elevate taskmgr elevate -k elevate /w HashCheckInstall.exe elevate -k sfc /scannow elevate /c del %SystemRoot%\Temp\*.* elevate -c -w copy foo*.* bar FEATURES ******** Although there are a number of other tools that serve the same purpose, this particular utility has several features that set it apart from the rest: * Correct handling of command line parameters; the command line parameters are passed along for execution verbatim, without being chopped up and reassembled. * The ability to launch the command processor using /c instead of /k. * The ability to launch the command processor in the current directory. * Better error messages to make troubleshooting execution problems easier. * Native C code avoids the burdensome .NET startup overhead and allows for a much smaller executable file size. ELEVATE TOOLS ************* Similar tools [free(ware)]: http://sourceforge.net/projects/welevate/ http://downloads.sourceforge.net/project/welevate/bin/Elevate.1.0.4046.20249.zip http://www.robotronic.de/elevate.html http://www.windowsitpro.com/windows-server-2008/automatic-elevation-cmd-script/ http://www.winability.com/info/elevate/  ELEVATE.EXE v1.0 (c) 2007-2016 - Johannes Passing - http://int3.de/ ******************************************************************* * Elevate (Elevate.exe 32-bit + Elevate.exe 64-bit) 1.0 32-bit + 64-bit DOS console tools for Windows Vista/2008/7/8/8.1/2012/10/2016 run any program/process/service/script/batch elevated with Administrator rights, useful for task automation in BATch (.BAT, .CMD) and script (.VBS) files: http://www.jpassing.com/2007/12/08/launch-elevated-processes-from-the-command-line/ Direct download [102 KB, freeware]: http://github.com/jpassing/elevate/releases/download/1.0/elevate.zip SYNTAX ****** Execute a process on the command line with elevated rights in Windows Vista/2008/7/8/8.1/2012/10/2016. Usage: Elevate [-?|-wait|-k] prog [args] -? - Shows this help -wait - Waits until prog terminates -k - Starts the the %COMSPEC% environment variable value and executes prog in it (CMD.EXE, 4NT.EXE, etc.) prog - The program to execute args - Optional command line arguments to prog Usage with scripts: When using the Elevate command with scripts such as Windows Script Host or Windows PowerShell scripts, you should specify the script host executable (i.e. wscript, cscript, powershell) as the application. Examples: Elevate wscript "C:\windows\system32\slmgr.vbs" -dli Elevate powershell -NoExit -Command & 'C:\Temp\Test.ps1' LIMITATION ********** * BUG: Relative path DOS command console environment variables used to switch to (default to) current directory/folder or drive/partition/volume root directory/folder may not work properly with these Elevate tools either from the command line, or from within BATch (.BAT, .CMD) or script (.VBS) files. Examples: PUSHD "%CD%" CD /D "%~dp0" * FIX: Use this Elevate tool: http://code.kliu.org/misc/elevate/ ELEVATE TOOLS ************* Similar tools [free(ware)]: http://sourceforge.net/projects/welevate/ http://downloads.sourceforge.net/project/welevate/bin/Elevate.1.0.4046.20249.zip http://www.robotronic.de/elevate.html http://www.windowsitpro.com/windows-server-2008/automatic-elevation-cmd-script/ http://www.winability.com/info/elevate/  Microsoft Elevation PowerToys v1.1 - 4-29-2008 ********************************************** * Elevate command line (ELEVATE.CMD + ELEVATE.VBS) + RunAs.hta tools, PowerShell/VBS scripts + Elevation gadget for Windows Vista/2008/7/8/8.1/2012/10/2016 run any program/application as different user with elevated/administrator privileges: http://technet.microsoft.com/magazine/2008.06.elevation.aspx Direct download [200 KB, English]: http://download.microsoft.com/download/f/d/0/fd05def7-68a1-4f71-8546-25c359cc0842/Elevation2008_06.exe More info: http://technet.microsoft.com/magazine/2007.06.utilityspotlight.aspx REQUIRED ******** Both ELEVATE.CMD + ELEVATE.VBS must reside inside same folder/directory. SYNTAX ****** Provides a command line method (DOS console, BATch/Script file, Run... box) of launching applications that prompt for elevation (Run as Administrator) in Windows Vista/2008/7/8/8.1/2012/10/2016. Must run ELEVATE.CMD with command line parameters. ELEVATE application Examples: ELEVATE notepad "C:\Windows\win.ini" ELEVATE cmd /k cd "C:\Program Files" ELEVATE powershell -NoExit -Command Set-Location 'C:\Windows' Usage with scripts: When using the ELEVATE command with scripts such as Windows Script Host or Windows PowerShell scripts, you should specify the script host executable (i.e. wscript, cscript, powershell) as the application. Examples with scripts: ELEVATE wscript "C:\windows\system32\slmgr.vbs" -dli ELEVATE powershell -NoExit -Command & 'C:\Temp\Test.ps1' LIMITATION ********** * BUG: Relative path DOS command console environment variables used to switch to (default to) current directory/folder or drive/partition/volume root directory/folder may not work properly with these Elevate tools either from the command line, or from within BATch (.BAT, .CMD) or script (.VBS) files. Examples: PUSHD "%CD%" CD /D "%~dp0" * FIX: Use this Elevate tool: http://code.kliu.org/misc/elevate/ ELEVATE TOOLS ************* Similar tools [free(ware)]: http://sourceforge.net/projects/welevate/ http://downloads.sourceforge.net/project/welevate/bin/Elevate.1.0.4046.20249.zip http://www.robotronic.de/elevate.html http://www.windowsitpro.com/windows-server-2008/automatic-elevation-cmd-script/ http://www.winability.com/info/elevate/