I did a search for this and didn't find anything that addressed this issue, but as I am new, I could have missed it. If so, sorry. I want to make sure the script bombs out after a certain point if the user is logging into a server. Here is how I thought this should be done:
Code:
Dim $UID, $PT
$UID = @UserID
IF @ProductType = "Windows 2000 Server"
OR "Windows 2000 Domain Controller"
OR "Windows Server 2003"
OR "Windows Server 2003 Domain Controller"
OR "Windows Server 2003 R2"
OR "Windows Server 2003 R2 Domain Controller"
$PT = "Server"
ELSE
$PT = @ProductType
ENDIF

;and later

IF $PT = "Server"
? "Bypassing the login script because you are logging in"
? "from a " + @ProductType + "!"
GOTO end ;bypassing the rest of this script
ENDIF


The problem is that it is giving that message even on a Windows XP Pro computer and then bombing to end. I also tried it without the quotation marks around 'server'. What am I doing wrong?

Thanks!


Edited by Howard Bullock (2006-04-07 08:31 PM)