aboutsummaryrefslogtreecommitdiff
path: root/util/1-setup-path-win.bat
diff options
context:
space:
mode:
Diffstat (limited to 'util/1-setup-path-win.bat')
-rw-r--r--util/1-setup-path-win.bat66
1 files changed, 0 insertions, 66 deletions
diff --git a/util/1-setup-path-win.bat b/util/1-setup-path-win.bat
deleted file mode 100644
index 699aee215..000000000
--- a/util/1-setup-path-win.bat
+++ /dev/null
@@ -1,66 +0,0 @@
1@SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
2@ECHO OFF
3SET CMDLINERUNSTR=%SystemRoot%\system32\cmd.exe
4
5DEL script1.log > NUL 2>&1
6DEL add-paths.log > NUL 2>&1
7DEL add-paths-detail.log > NUL 2>&1
8DEL UPDATE > NUL 2>&1
9
10ELEVATE -wait add-paths.bat >> script1.log 2>&1
11
12IF ERRORLEVEL 1 (
13 ECHO You denied admin access. Rerun the script, and be sure to press the yes button this time.
14) ELSE (
15 TYPE add-paths.log 2> NUL
16)
17ECHO.
18
19:: Branch to UpdateEnv if we need to update
20IF EXIST UPDATE (
21 DEL UPDATE
22 GOTO UpdateEnv
23)
24
25GOTO ExitBatch
26
27:: -----------------------------------------------------------------------------
28
29:UpdateEnv
30ECHO Making updated PATH go live . . .
31REG delete HKCU\Environment /F /V TEMPVAR > NUL 2>&1
32setx TEMPVAR 1 > NUL
33REG delete HKCU\Environment /F /V TEMPVAR > NUL 2>&1
34IF NOT !cmdcmdline! == !CMDLINERUNSTR! (CALL :KillExplorer)
35GOTO ExitBatch
36
37:: -----------------------------------------------------------------------------
38
39:ExitBatch
40ENDLOCAL
41PAUSE
42EXIT /b
43
44:: -----------------------------------------------------------------------------
45
46:KillExplorer
47ECHO.
48ECHO.
49ECHO Your desktop will be restarted.
50ECHO.
51ECHO All file explorer windows except for the one you launched this script from WILL BE CLOSED.
52ECHO.
53ECHO Press enter when ready, or close this window if you would rather do a full restart of your computer at a later time.
54ECHO.
55PAUSE
56ping -n 5 127.0.0.1 > NUL 2>&1
57ECHO Killing process Explorer.exe. . .
58ECHO.
59taskkill /f /im explorer.exe > NUL
60ECHO.
61ECHO Your desktop is now loading. . .
62ECHO.
63ping -n 5 127.0.0.1 > NUL 2>&1
64START explorer.exe
65START explorer.exe %CD%
66EXIT /b \ No newline at end of file