36 lines
1.1 KiB
Batchfile
36 lines
1.1 KiB
Batchfile
@echo off
|
|
REM ==========================================================================
|
|
REM Diagnose-eDNCDetection.bat - diagnose the eDNC 6.4.5 enforce loop (MSI
|
|
REM 1603 "same or newer already installed" every 5 minutes).
|
|
REM
|
|
REM Usage (run on the problem PC):
|
|
REM Diagnose-eDNCDetection.bat auto-find manifest (W: or UNC)
|
|
REM Diagnose-eDNCDetection.bat /manifest <path> explicit manifest.json path
|
|
REM
|
|
REM Read-only: no installs, no share writes.
|
|
REM ==========================================================================
|
|
setlocal EnableDelayedExpansion
|
|
|
|
REM --- self-elevate ---
|
|
net session >nul 2>&1
|
|
if %errorlevel% neq 0 (
|
|
echo Requesting administrator elevation...
|
|
powershell -NoProfile -Command "Start-Process -Verb RunAs -FilePath '%~f0' -ArgumentList '%*'"
|
|
exit /b
|
|
)
|
|
|
|
set "PS=%~dp0Diagnose-eDNCDetection.ps1"
|
|
set "ARGS="
|
|
|
|
:parse
|
|
if "%~1"=="" goto run
|
|
if /I "%~1"=="/manifest" set "ARGS=!ARGS! -ManifestPath '%~2'" & shift & shift & goto parse
|
|
shift
|
|
goto parse
|
|
|
|
:run
|
|
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%PS%" !ARGS!
|
|
echo.
|
|
pause
|
|
endlocal
|