13 lines
416 B
Batchfile
13 lines
416 B
Batchfile
|
|
@echo off
|
||
|
|
setlocal
|
||
|
|
cd /d "%~dp0"
|
||
|
|
net session >nul 2>&1
|
||
|
|
if not "%errorlevel%"=="0" (
|
||
|
|
echo Requesting Administrator permission for Task Scheduler registration...
|
||
|
|
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "Start-Process -FilePath '%~f0' -ArgumentList '%*' -Verb RunAs"
|
||
|
|
exit /b
|
||
|
|
)
|
||
|
|
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\restore_after_format.ps1" %*
|
||
|
|
echo.
|
||
|
|
pause
|