OH5-Print-Installer_Batch/Assets/zTool/enable_script.bat
2025-11-03 15:44:27 +01:00

12 lines
382 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 Erlaube Script-Execution
powershell -Command "Set-ExecutionPolicy RemoteSigned -Scope LocalMachine"
echo Kehre ins das Hauptmenue zurueck