improve batch script installers

- remove annoying confirmations on disable/enable scripts
- fix disable script on x86
- make sure Schedule service is running before trying do anything with
schtasks
This commit is contained in:
zeffy
2017-06-13 04:08:22 -07:00
parent 3d0b322f1e
commit c4a78a3e24
4 changed files with 7 additions and 26 deletions

View File

@@ -35,7 +35,7 @@ if /I "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
)
if /I "%PROCESSOR_ARCHITECTURE%"=="x86" (
set "WINDOWS_ARCHITECTURE=x86"
set "wufuc_dll=%~dp0wufuc32.dll"
set "wufuc_dll=%~dp0..\wufuc32.dll"
goto :confirmation
)
)
@@ -45,13 +45,9 @@ goto :die
set "WINDOWS_ARCHITECTURE=x64"
set "wufuc_dll=%~dp0..\wufuc64.dll"
:confirmation
set /p CONTINUE=Enter 'Y' if you want to disable wufuc:
if /I not "%CONTINUE%"=="Y" goto :cancel
echo.
set "wufuc_task=wufuc.{72EEE38B-9997-42BD-85D3-2DD96DA17307}"
rundll32 "%wufuc_dll%",Rundll32Unload
net start Schedule
schtasks /Change /TN "%wufuc_task%" /DISABLE
echo.
@@ -59,12 +55,5 @@ echo Disabled wufuc! You will still be able to check for updates until you resta
:die
echo.
echo Press any key to exit...
pause >nul
exit
:cancel
echo.
echo Canceled by user, press any key to exit...
pause >nul
pause
exit