@echo off
title Jai Computers - Windows Update / Driver / Install Repair
color 0A
echo Jai Computers Osian - Windows Update / Driver / Software Install Repair
echo.
net session >nul 2>&1
if not "%errorlevel%"=="0" (
  echo Admin permission required. UAC prompt open ho raha hai...
  powershell -NoProfile -ExecutionPolicy Bypass -Command "Start-Process -FilePath '%~f0' -Verb RunAs"
  exit /b
)
echo Admin mode: OK
echo.
echo Ye Windows Update cache reset, SFC health check, Device Manager aur Update settings open karega.
echo Recommended: Run as administrator. Time lag sakta hai.
echo.
pause
choice /M "Windows Update cache reset karna hai? Ye safe hai, lekin time lag sakta hai"
if errorlevel 2 goto skipupdatereset
echo Stopping update services...
net stop wuauserv
net stop bits
net stop cryptsvc
echo Renaming update cache...
ren C:\Windows\SoftwareDistribution SoftwareDistribution.old 2>nul
ren C:\Windows\System32\catroot2 catroot2.old 2>nul
echo Starting update services...
net start cryptsvc
net start bits
net start wuauserv
:skipupdatereset
echo Running system file check...
sfc /scannow
start ms-settings:windowsupdate
start devmgmt.msc
echo.
echo Driver yellow mark, error code ya setup error ka photo WhatsApp par bhejein.
pause
