@echo off
cd /d "%~dp0"
REM Check if the script is running with administrative privileges
net session >nul 2>&1
if %errorLevel% == 0 (
    goto :runCommand
) else (
    echo Administrative privileges required. Running script as administrator...
    powershell -Command "Start-Process '%0' -Verb RunAs"
    exit /b
)

:runCommand
REM Command to install the driver using pnputil
pnputil -i -a "%~dp0silabser.inf"

echo Driver installation complete.
pause