Page 1 of 1 1
Topic Options
#17938 - 2002-02-25 11:25 PM No scripts on Server Product
CLAY Offline
Fresh Scripter

Registered: 2002-02-09
Posts: 7
Loc: Vicksburg, MS
I do not want my scripts to run when admins log into NT servers. I added the section below to my script to try to prevent this. It worked fine until I added the @productsuite case. I want the scripts to run if it is a terminal server, but that is the only type of server I want them to run on. I guess I am not sure about a couple of things.
One - how to use the @productsuite macro (do I use the number or the name?)
Two - If win2k terminal server in admin mode is enabled is this going to make the @productsuite = 16 or "terminal server" true?
Here is the script:
;Checks for NT Server OS and exits if true -checks if terminal server first and skips if true
Case @PRODUCTSUITE = 16
GOTO "resume0"
Case @PRODUCTTYPE = ("Windows NT Server")
exit
Case @PRODUCTTYPE = ("Windows 2000 Server")
exit
Endselect

:resume0

thanks
Clay Hilton

_________________________
Clay

Top
#17939 - 2002-02-25 11:57 PM Re: No scripts on Server Product
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
@ProductSuite returns a bitwise value. In the case of my TS I get a value of 18.
16 "Terminal Server"
2 "Enterprise"

Run a test script on your TS to see what is returned.

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#17940 - 2002-02-26 12:27 AM Re: No scripts on Server Product
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Another option to use is the GETTYPE.EXE util from the 2000 Resource Kit. However, you would probably incorporate this in the NTLOGON.BAT file. Here is an interesting bit on this - 2405 » How do determine the Windows NT / Windows 2000 O/S type in a logon script?.

- Kent

[ 26 February 2002: Message edited by: kdyer ]

_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#17941 - 2002-02-26 05:18 AM Re: No scripts on Server Product
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Clay,
I should have mentioned that since @ProductSuite returns a bitwise value, you can do a bitwise and '&' against it.

quote:
KiXtart support the following numeric operators:

+
Used to sum two numbers.
-
Used to find the difference between two numbers or to indicate the negative value of a numeric expression.
*
Used to multiply two numbers.
/
Used to divide two numbers and return an integer result.
&
The & operator performs a bit-wise mathematical AND operation on two numbers.
|
The | operator performs a bit-wise mathematical OR operation on two numbers.


_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 484 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.051 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org