Hello. I'm creating this bat script, but it's not working (it's rebooting, but no restart after that):
Could anyone help? Run it as update 0 with admin rights
Could anyone help? Run it as update 0 with admin rights
Code:
@[URL="https://www.sevenforums.com/members/echo.html"]echo[/URL] off
title Install stage %1%
echo.
IF "%1%"=="0" (
echo program 0 will be run here
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /f /v SP2 /t REG_SZ /d ""%~dp0update 1""
pause
shutdown /r /t 0
)
IF "%1%"=="1" (
echo program 1 will be run here
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /f /v SP2 /t REG_SZ /d ""%~dp0update 2""
pause
shutdown /r /t 0
)
IF "%1%"=="2" (
echo program 2 will be run here
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /f /v SP2 /t REG_SZ /d ""%~dp0update 3""
pause
shutdown /r /t 0
)
IF "%1%"=="3" (
echo program 3 will be run here
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /f /v SP2 /t REG_SZ /d ""%~dp0update 4""
pause
shutdown /r /t 0
)
IF "%1%"=="4" (
echo Installation complete!
pause
)
My Computers
System One System Two
-
- OS
- Win7 x64 Pro
-
- Computer type
- PC/Desktop
