$rebootScript = "PATHTODROPBOXDIRECTORY\reboot.bat"
WHILE($true)
{
IF(Test-Path -Path $rebootScript)
{
Start-Process -Path $rebootScript
break
} ELSE
{
Start-Sleep -Seconds 300
}
}
install sofware....
:LOOP
IF EXIST PATHTODROPBOXDIRECTORY\reboot.bat (
shutdown /r /t 10 /c "Computer restarting to complete software install"
GOTO EXITLOOP
) ELSE (
TIMEOUT /T 300
GOTO :LOOP
)
:EXITLOOP
exit 0
$rebootScript = "PATHTODROPBOXDIRECTORY\reboot.bat"
WHILE($true)
{
IF(Test-Path -Path $rebootScript)
{
Start-Process -Path $rebootScript
break
} ELSE
{
Start-Sleep -Seconds 300
}
}
CMD/batch are going to be deprecated in the future you're better off using powershell.
If you're using a script to install the software you could do
Code:install sofware.... :LOOP IF EXIST PATHTODROPBOXDIRECTORY\reboot.bat ( shutdown /r /t 10 /c "Computer restarting to complete software install" GOTO EXITLOOP ) ELSE ( TIMEOUT /T 300 GOTO :LOOP ) :EXITLOOP exit 0