#181040 - 2007-10-02 06:16 PM
OS Type
|
Graham
Lurker
Registered: 2007-10-02
Posts: 1
|
Hi
I have a login script that uses the OS Type to determine if a pc is a server or workstation the code is -
If (:inwin=1) $OS_Type ="NT" Else $OS_Type ="9x" Endif
The script works fine on all PC's apart from Vista clients? Could any shed some light as to why?
Thanks
|
|
Top
|
|
|
|
#181043 - 2007-10-02 07:19 PM
Re: OS Type
[Re: Björn]
|
Glenn Barnas
KiX Supporter
   
Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
|
This is what I use, from the @PRODUCTTYPE macro when run locally:
$CType = IIf(InStr(@PRODUCTTYPE, 'Server') Or InStr(@PRODUCTTYPE, 'Controller'), 'Server', 'Workstation') For remote systems, I use something like:
; Base registry paths for registry reads $_RegCtrl='HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\'
$_OS_Type = ReadValue($_Target + $_RegCtrl + 'ProductOptions', 'ProductType')
$CType = IIf(InStr('LanManNTServerNT', $_OS_Type), 'Server','Workstation')
Glenn
_________________________
Actually I am a Rocket Scientist!
|
|
Top
|
|
|
|
#181068 - 2007-10-03 05:56 AM
Re: OS Type
[Re: Glenn Barnas]
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11634
Loc: Space
|
Well true there are shops out there like that but they would also have to be on an NT4 Domain as AD doesn't support Win9x logins as I recall (been long time).
Just glad I'm not in that boat
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1636 anonymous users online.
|
|
|