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