General discussion

Locked

Logon Batch file - Detect an OS

By steven_maxam ·
I want to know how to configure my logon batch file to detect the Win95 and NT operating systems and not allow them on the network? If there is a better way that using the logon batch file please let me know.

Thanks,
Steve

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by erikdr In reply to Logon Batch file - Detect ...

Batch is not a bad idea. You could do checks on the directory structure on C: and check for files that only W2K and XP have. (Checks on environment variables like 'OS' are not easy, e.g. W2K still shows 'Win_NT' just as NT itself does.) If the needed files are not there, jump to a part of the batchfile which has a thirdparty or free util that forces a reboot. In itself, at the end of a batchfile the user will always be IN the network and that's not what you want...

HTH,

<Erik> - The Netherlands

Collapse -

by SyscoKid In reply to Logon Batch file - Detect ...

@echo off
ver |find "XP">nul
if errorlevel 1 goto notXP
:: XP stuff here
...
goto end

:notXP
ver |find "98">nul
if errorlevel 1 goto not98
:: 98 stuff here
...
goto end

:not98
(and so on, 95, NT, 2K, whatever - use the string from VER to find an appropriate string to test with FIND)

:end

Back to Networks Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums