mirror of
https://github.com/arkenfox/user.js.git
synced 2025-05-07 01:13:43 +02:00
prompt to run prefsCleaner under very specific circumstances
Will gladly write something more sophisticated if there is a demand for it.
This commit is contained in:
parent
61173f8db1
commit
9ccdf997ea
1 changed files with 12 additions and 3 deletions
15
updater.bat
15
updater.bat
|
@ -42,10 +42,10 @@ IF DEFINED _updateb (
|
||||||
REM * Start that script in a new CMD window
|
REM * Start that script in a new CMD window
|
||||||
REM * Exit
|
REM * Exit
|
||||||
CALL :message "Updating script..."
|
CALL :message "Updating script..."
|
||||||
REM Uncomment the next line and comment the powershell call for testing.
|
REM Uncomment the next line and comment the PowerShell call for testing.
|
||||||
REM COPY /B /Y "!_myname!.bat" "[updated]!_myname!.bat"
|
REM COPY /B /Y "!_myname!.bat" "[updated]!_myname!.bat"
|
||||||
(
|
(
|
||||||
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/updater.bat', '[updated]!_myname!.bat')"
|
PowerShell -Command "(New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/ghacksuserjs/ghacks-user.js/master/updater.bat', '[updated]!_myname!.bat')"
|
||||||
) >nul 2>&1
|
) >nul 2>&1
|
||||||
IF EXIST "[updated]!_myname!.bat" (
|
IF EXIST "[updated]!_myname!.bat" (
|
||||||
START /min CMD /C "[updated]!_myname!.bat" !_myparams!
|
START /min CMD /C "[updated]!_myname!.bat" !_myparams!
|
||||||
|
@ -174,6 +174,7 @@ IF EXIST user.js.new (
|
||||||
) ELSE (
|
) ELSE (
|
||||||
REN user.js.new user.js
|
REN user.js.new user.js
|
||||||
CALL :message "Update complete."
|
CALL :message "Update complete."
|
||||||
|
SET "_changed=true"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
) ELSE (
|
) ELSE (
|
||||||
|
@ -181,7 +182,15 @@ IF EXIST user.js.new (
|
||||||
ECHO: No changes were made.
|
ECHO: No changes were made.
|
||||||
)
|
)
|
||||||
IF NOT DEFINED _log (
|
IF NOT DEFINED _log (
|
||||||
IF NOT DEFINED _ua (PAUSE)
|
IF NOT DEFINED _ua (
|
||||||
|
IF EXIST prefsCleaner.bat (
|
||||||
|
IF "!_changed!"=="true" (
|
||||||
|
CALL :message "Would you like to run the prefsCleaner now?"
|
||||||
|
CHOICE /C YN /N /M "(Y/N) "
|
||||||
|
IF "1"=="!errorlevel!" ( START "" cmd.exe /C "prefsCleaner.bat" )
|
||||||
|
) ELSE (PAUSE)
|
||||||
|
) ELSE (PAUSE)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
EXIT /B
|
EXIT /B
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue