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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
Thanks again.
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
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
ASKER
Thanks Joe. That's really helpful, I'll add the code now.
You're welcome!
http://stackoverflow.com/questions/13693490/vbs-or-bat-determine-os-and-office-version