Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

basically a 3rd parts installed a 2003 ts a while back. Im now trying to test windows 7 (x64) and with the users logon script it fails (if it helps it a kix script) but ideally as i never liked what they did anyway i want to change ad to point at a vbs/batch that pretty much says is os>6 do x if os<6 run the kix script

 

ive seen a batch file but i need to specifiy for every version of windows what to do surely theres a simpler way of saying <6 >6?

 

@ECHO OFF
VER | findstr /l "5.0." > nul
IF %ERRORLEVEL% EQU 0 ECHO Running 2000

VER | findstr /l "5.1." > nul
IF %ERRORLEVEL% EQU 0 ECHO Running Win xp

VER | findstr /l "5.2." > nul
IF %ERRORLEVEL% EQU 0 ECHO Running Win 2003

VER | findstr /l "6.0." > nul
IF %ERRORLEVEL% EQU 0 ECHO Running Vista

VER | findstr /l "6.0." > nul
IF %ERRORLEVEL% EQU 0 ECHO Running Vista

VER | findstr /l "6.1." > nul
IF %ERRORLEVEL% EQU 0 ECHO Running windows 7

:end
pause

Posted

well that was simple doh!

(granted it launches notepad on win7 atm but thats just a placeholder

@ECHO OFF

VER | findstr /l "6.1." > nul
IF %ERRORLEVEL% EQU 0 (notepad) else (\\server\netlogon\kix32.exe \\server\netlogon\logon.kix)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...