-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautoexec.bat
More file actions
57 lines (41 loc) · 1.29 KB
/
autoexec.bat
File metadata and controls
57 lines (41 loc) · 1.29 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@ECHO OFF
SET scriptName=%~nx0
SETLOCAL
ECHO ^[%scriptName%^]: BEGIN
SET scriptDir=%~dp0
ECHO ^[%scriptName%^]: Initializing doskey macros
@REM doskey savehist=doskey /history $g$g "%scriptDir%doskey_history.txt"
@REM doskey showhist=type "%scriptDir%doskey_history.txt"
doskey /MACROFILE="%scriptDir%\doskey_macros.txt"
REM doskey /macros
ENDLOCAL
SET promptName=%USERNAME%
if "%USERDOMAIN%" NEQ "%COMPUTERNAME%" SET promptName=%USERNAME%@%USERDOMAIN%
SET promptCmd=PROMPT ^[%promptName% on %COMPUTERNAME%^] $D $T $P$+$G
ECHO ^[%scriptName%^]: Executing %promptCmd%
%promptCmd%
SET scriptsDir=%~dp0
ECHO ^[%scriptName%^]: Exported scriptsDir=%scriptsDir% to environment
call %scriptsDir%\initconda.bat
SET QT_SCALE_FACTOR=1.25
echo ^[%scriptName%^]: set QT_SCALE_FACTOR to %QT_SCALE_FACTOR%
echo.
@REM echo .
@REM call :updatepath "%ProgramFiles%\Notepad++"
@REM echo .
@REM call :updatepath "%ProgramFiles%\Microsoft VS Code"
ECHO ^[%scriptName%^]: END
goto :eof
:updatepath
set target=%~1
IF EXIST "%target%" (
@REM echo ^[%scriptName%^]: Checking PATH for %target%
set chkpath="%PATH:Notepad++=%"
IF "%PATH%" EQU "%chkpath%" (
@REM echo ^[%scriptName%^]: PATH has %target%
) else (
echo ^[%scriptName%^]: adding to PATH: %target%
PATH=%target%;%PATH%
)
goto :eof
)