@echo off REM Ensure-PCDMISFrontEnd.bat - launcher for Ensure-PCDMISFrontEnd.ps1 REM REM Creates C:\GE PC-DMIS FRONT END + grants the operator write access, so REM PCDToIGES.exe can write its error log there instead of crashing with REM "Could not find a part of the path 'C:\GE PC-DMIS FRONT END\PCDToIGES.ERR'". REM REM Needs admin - self-elevates. net session >nul 2>&1 if %errorlevel% neq 0 ( echo Requesting administrator rights... powershell -NoProfile -Command "Start-Process -FilePath '%~f0' -Verb RunAs" exit /b ) set "HERE=%~dp0" powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%HERE%Ensure-PCDMISFrontEnd.ps1" echo. pause