Somebody please help me out before I go POSTAL! I can run this script on Win95 machines, Win2k, and AS machines. When a 98 machine runs it it acts as if it's a server...it exits the script. Can somebody help a poor old network guy out? Here is a section of the script. It bombs at the bottom when it checks to see if it's a server.

code:

select
Case @inwin=1
$kernel="WinNT"
$Svcpack=ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion","CSDVersion")
$prodkey="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions"
$type=ReadValue("$prodkey","ProductType")
$Suite=ReadValue("$prodkey","ProductSuite")
IF LEN($Suite)>0
while INSTR($Suite,"|")
$pipe=INSTR($Suite,"|")
$front=SUBSTR($Suite,1,$pipe-1)
$back =SUBSTR($Suite,$pipe+1,len($suite)-len(front) )
$Suite=$front+" "+$back
loop
Else
$Suite=""
EndIf
select
Case @dos=5.0
$system="Win2k"
Case @dos=4.0
$system="WinNT"
endselect
select
Case $type="LANMANNT"
$flavor="$Suite"+"Domain Controller"
Case $type="ServerNT"
$flavor="$Suite "+"Member Server"
Case $type="WinNT"
$flavor="Workstation"

endselect
Case @inwin=2
$kernel="Win9x"
$Svcpack=""
$SubVer=ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion","SubVersionNumber")
select
Case @dos="4.90"
$system="WinME"
$flavor="A"
Case @dos="4.10"
$system="Win98"
select
Case $subver="a " ;This is the culprit, needs a space before the "a".
$flavor="SE"
Case $subver=" "
$flavor="A"
endselect
Case @dos="4.0"
$system="Win95"
select
Case $subver=" C"
$flavor="OSR2.5"
Case $subver=" B"
$flavor="OSR2"
Case $subver="a"
$flavor="A"
endselect
endselect
endselect

? "Kernel is $kernel"
? "OS is $system $Svcpack"
? "Flavor is $flavor"

select

case $flavor="$Suite"+"Domain Controller" or $flavor="$Suite"+"Member Server"
gosub "end"
endselect


[This message has been edited by brewdude6 (edited 31 January 2001).]

[This message has been edited by brewdude6 (edited 02 February 2001).]

[This message has been edited by brewdude6 (edited 02 February 2001).]

_________________________
I could have made a neat retort but didn't, for I was flurried and didn't think of it till I was downstairs.
-Mark Twain