Link to home
Start Free TrialLog in
Avatar of afl_it
afl_it

asked on

Logon Scripts - Determine OS version and then run a command

Hello,
Is there a command I can use within a vbs login script that will determine the Windows version that PC is running and then execute a batch file if it's running Windows 7.

Any help is much appreciated, my vbs skills are pretty non existent at the moment.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of gmrstudios2013
gmrstudios2013

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of afl_it
afl_it

ASKER

Great, thanks gmrstudios2013. That worked a treat. We now have a batch file that's called by Group Policy that disables and removes the Microsoft Virtual WiFi Miniport Adapter!

Thanks again.
Avatar of Joe Winograd
I see that you already accepted gmrstudios2013's excellent answer and closed the question, but you may want to add code for Windows 8, in case there are some W8 systems in your future. The two lines of code placed before the first [goto end] statement would be:

ver | findstr /i "6\.2\." > nul
IF %ERRORLEVEL% EQU 0 goto ver_Win8

And then these two lines would be in the section after the first [goto end] statement:

:ver_Win8
*** run whatever you want here for W8
goto end

Regards, Joe
Avatar of afl_it

ASKER

Thanks Joe. That's really helpful, I'll add the code now.
You're welcome!