@echo off reg query HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\ /v drives >nul 2>&1 if %ERRORLEVEL% == 0 goto end if %ERRORLEVEL% == 1 goto installdrives :installdrives reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v drives /t reg_sz /d "\\server\scripts\drives.bat" goto end :end @exit