Question Locked

suppress logon script

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How do I stop logon scripts from running on a particular server when users logon to using their domain credentials (which normally triggers logon script to run)

2 replies

by Former member

Within the vbscript, put in something like this at the top.
Assuming that the terminal server isn't XP, the script will continue.
If it is XP, the script will quit.

strComputer = "."
Set objWMIService = GetObject("winmgmts:" &
Set colOperatingSystems = objWMIService.ExecQuery("SELECT * FROM
Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
strOSType = objOperatingSystem.Caption
Next
If strOSType = "Microsoft Windows XP Professional" Then
Wscript.quit
End If

http://www.eggheadcafe.com/software/aspnet/29696265/how-to-stop-the-logon-scr.aspx

Please post back if you have any more problems or questions.

This discussion is closed to new replies.