Path 설정 업데이트

This commit is contained in:
leedongmyung 2023-11-12 22:31:55 +09:00
parent 0ce71f7328
commit e074a3dbd6
2 changed files with 14 additions and 4 deletions

View file

@ -1,12 +1,17 @@
@echo off
set "PathSystem="
for /F "skip=2 tokens=1,2*" %%G in ('%SystemRoot%\System32\reg.exe query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v "Path" 2^>nul') do if /I "%%G" == "Path" (
if /I "%%H" == "REG_EXPAND_SZ" (set "PathExpand=1" & set "PathSystem=%%I") else if /I "%%H" == "REG_SZ" set "PathSystem=%%I"
)
set "PathUser="
for /F "skip=2 tokens=1,2*" %%G in ('%SystemRoot%\System32\reg.exe query "HKCU\Environment" /v "Path" 2^>nul') do if /I "%%G" == "Path" (
if /I "%%H" == "REG_EXPAND_SZ" (set "PathExpand=1" & set "PathUser=%%I") else if /I "%%H" == "REG_SZ" set "PathUser=%%I"
)
PATH=%PathUser%
echo %PATH%
SET BuildData > build_data.conf
PATH=%PathSystem%;%PathUser%
echo %PATH%
SET BuildData > build_data.conf
SET BUILDER=%~dp0
cd "%BUILDER%..\..\.."

View file

@ -2,11 +2,16 @@
: PATH_WIN은 젠킨스에서 설정을 해주어야 한다
@echo off
set "PathSystem="
for /F "skip=2 tokens=1,2*" %%G in ('%SystemRoot%\System32\reg.exe query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v "Path" 2^>nul') do if /I "%%G" == "Path" (
if /I "%%H" == "REG_EXPAND_SZ" (set "PathExpand=1" & set "PathSystem=%%I") else if /I "%%H" == "REG_SZ" set "PathSystem=%%I"
)
set "PathUser="
for /F "skip=2 tokens=1,2*" %%G in ('%SystemRoot%\System32\reg.exe query "HKCU\Environment" /v "Path" 2^>nul') do if /I "%%G" == "Path" (
if /I "%%H" == "REG_EXPAND_SZ" (set "PathExpand=1" & set "PathUser=%%I") else if /I "%%H" == "REG_SZ" set "PathUser=%%I"
)
PATH=%PathUser%
PATH=%PathSystem%;%PathUser%
echo %PATH%
: cd ../dart_framework && git pull origin master
: cd "../%JOB_NAME%"