@echo off reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v InstallationType|find "Client">nul if errorlevel 1 ( echo server ) else ( echo client )