12 lines
379 B
Batchfile
12 lines
379 B
Batchfile
@echo off
|
|
:: Prüfe, ob Admin-Rechte vorhanden sind
|
|
NET SESSION >nul 2>&1
|
|
IF %ERRORLEVEL% NEQ 0 (
|
|
echo Starte Skript mit Admin-Rechten ...
|
|
powershell -Command "Start-Process cmd -ArgumentList '/c \"%~f0\"' -Verb RunAs"
|
|
exit
|
|
)
|
|
|
|
echo Sperre Script-Execution
|
|
powershell -Command "Set-ExecutionPolicy Restricted -Scope LocalMachine"
|
|
echo Kehre ins das Hauptmenue zurueck
|