From 07c8951ec3706fb81432c0538554a48df01ab11d Mon Sep 17 00:00:00 2001 From: xrgzs Date: Thu, 9 May 2024 20:24:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E5=AF=B9ReinstWin?= =?UTF-8?q?=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api.bat | 1 + osc.nsi | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/api/api.bat b/api/api.bat index 6f73a84..9ff27fd 100644 --- a/api/api.bat +++ b/api/api.bat @@ -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 diff --git a/osc.nsi b/osc.nsi index 27f9ea2..afeb8d1 100644 --- a/osc.nsi +++ b/osc.nsi @@ -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}