iann0036 Posted May 10, 2010 Share Posted May 10, 2010 @echo off for /f "tokens=2 delims=," %%a in ('systeminfo.exe /FO CSV') do ( set osver=%%a ) if %osver% == "Microsoft Windows 7 Home Premium " goto ver_7 goto warnthenexit :ver_7 :Run Windows 7 specific commands here. echo It's Windows 7 goto exit :ver_2008 :Run Windows Server 2008 specific commands here. echo It's Windows Server 2008 goto exit :ver_vista :Run Windows Vista specific commands here. echo It's Windows Vista goto exit :ver_2003 :Run Windows Server 2003 specific commands here. echo Windows Server 2003 goto exit :ver_xp :Run Windows XP specific commands here. echo It's Windows XP goto exit :ver_2000 :Run Windows 2000 specific commands here. echo It's Windows 2000 goto exit :ver_nt :Run Windows NT specific commands here. echo It's Windows NT goto exit :warnthenexit echo Machine undetermined. :exit Some batch file code I'm working on (obviously not finished). To inspire. Quote Link to comment Share on other sites More sharing options...
Sl45h3R Posted May 10, 2010 Share Posted May 10, 2010 (edited) I just ran 'systeminfo.exe /FO CSV' and it took longer than 20 seconds, so nice idea, but not that practical if you want to quickly plug it into a computer. If you know any programming language (C, C++, C# etc.) you could code it to detect it and run payloads alot easier than using batch :) Just my two cents. Edited May 10, 2010 by Sl45h3R Quote Link to comment Share on other sites More sharing options...
benownzu93 Posted June 5, 2010 Share Posted June 5, 2010 I just ran 'systeminfo.exe /FO CSV' and it took longer than 20 seconds You could Just use the "ver" command. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.