Skip to content

Commit

Permalink
增加 对ReinstWin的支持
Browse files Browse the repository at this point in the history
  • Loading branch information
xrgzs committed May 9, 2024
1 parent cbd2960 commit 07c8951
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/api.bat
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ if exist "%SystemDrive%\Windows\Setup\xrsyssearchapi.txt" (
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /f /v "XRSYSAPI"
for /f "delims= " %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /t REG_EXPAND_SZ ^| find /i "Unattend"') do reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v %%i /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /f /v "XRSYSAPI" /t REG_SZ /d "%~dp0osc.exe /S /5"
if exist "%SystemDrive%\Windows\OsConfig\osc.exe" reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /f /v "XRSYSAPI" /t REG_SZ /d "%SystemDrive%\Windows\OsConfig\osc.exe /S /5"
shutdown -r -t 0
goto end

Expand Down
11 changes: 11 additions & 0 deletions osc.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ Section /o "潇然系统部署接口-部署后" XRAPI3
SectionEnd

Section /o "潇然系统部署接口-登录时" XRAPI4
${If} ${FileExists} "$INSTDIR\xrsysstepapifiles.flag"
DetailPrint "APIFILES已经解压,跳过此操作!"
${Else}
SetOutPath "$INSTDIR\apifiles"
SetOverwrite on
DetailPrint "解压APIFILES..."
File /r ".\osc\apifiles\*.*"
FileOpen $0 "$INSTDIR\xrsysstepapifiles.flag" w
FileClose $0
${EndIf}

${If} ${FileExists} "$INSTDIR\xrsysstepapi4.flag"
DetailPrint "API4已经执行,跳过此操作!"
${Else}
Expand Down

0 comments on commit 07c8951

Please sign in to comment.