-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathOpenWithSublime_elevate.cmd
33 lines (31 loc) · 1.12 KB
/
OpenWithSublime_elevate.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
:: //***************************************************************************
:: // ***** Script Header *****
:: // =======================================================
:: // Elevation PowerToys for Windows Vista v1.1 (04/29/2008)
:: // =======================================================
:: //
:: // File: Elevate.cmd
:: //
:: // Additional files required: Elevate.vbs
:: //
:: // Purpose: To provide a command line method of launching applications that
:: // prompt for elevation (Run as Administrator) on Windows Vista.
:: //
:: // Usage: elevate.cmd application <application arguments>
:: //
:: // Version: 1.0.0
:: // Date : 01/02/2007
:: //
:: // History:
:: // 1.0.0 01/02/2007 Created initial version.
:: //
:: // ***** End Header *****
:: //***************************************************************************
@setlocal
@echo off
:: Pass raw command line agruments and first argument to Elevate.vbs
:: through environment variables.
set ELEVATE_CMDLINE=%*
set ELEVATE_APP=%1
if not DEFINED openwithsublime_elevation taskkill /f /im sublime_text.exe
start wscript //nologo "%~dpn0.vbs" %*