tech_guy
(Fresh Scripter)
2002-07-02 12:15 AM
Kixtart change?

Since I have upgraded to the newer release of Kixtart the following scriptlet refuses to work:

Select
Case ((@INWIN = 1) AND (@DOS = 5.0))
$OS = "Win2K"
Case ((@INWIN = 1) AND (@DOS = 4.0))
$OS = "WinNT4"
Case ((@INWIN = 2) AND (@DOS >= 4.10))
$OS = "Win98"
Case ((@INWIN = 2) AND (@DOS = 4.0))
$OS = "Win95"
Case 1
$OS = "Not found"
EndSelect

I can go into debug mode and ?@DOS and ?@inwin and everything looks okay. Was there a change that would affect this?

Mike


kholm
(Korg Regular)
2002-07-02 12:48 AM
Re: Kixtart change?

KiX now accepts real values.

@DOS returns a string, so you have to compare it with a string:

If $DOS = 5.0
Compares stringvalue '5.0' with real value 5.0 (always false)

Should be
If $DOS = '5.0'
Compares stringvalue '5.0' with string value '5.0' (True, if @DOS returns '5.0')

Your code should be changed to:
code:
Select
Case ((@INWIN = 1) AND (@DOS = '5.0'))
$OS = "Win2K"
Case ((@INWIN = 1) AND (@DOS = '4.0'))
$OS = "WinNT4"
Case ((@INWIN = 2) AND (@DOS >= '4.10'))
$OS = "Win98"
Case ((@INWIN = 2) AND (@DOS = '4.0'))
$OS = "Win95"
Case 1
$OS = "Not found"
EndSelect

-Erik


NTDOCAdministrator
(KiX Master)
2002-07-02 12:56 AM
Re: Kixtart change?

IF you are using the new 4.x version of KiXtart take a look at @PRODUCTTYPE faster easier method to determine the OS TYPE

OS type. Possible values:
"Windows 95"
"Windows 98"
"Windows Me"
"Windows NT Workstation"
"Windows NT Server"
"Windows NT Domain Controller"
"Windows 2000 Professional"
"Windows 2000 Server"
"Windows 2000 Domain Controller"
"Windows XP Home Edition"
"Windows XP Professional"
"Windows .Net Server"
"Windows .Net Domain Controller"


kholm
(Korg Regular)
2002-07-02 01:05 AM
Re: Kixtart change?

Short version of OS-check using KiX 4.x:

code:
$OS = Split(@ProductType)[1]

This will return

95,
98,
Me,
NT,
2000,
XP
or .Net

-Erik


tech_guy
(Fresh Scripter)
2002-07-02 03:57 AM
Re: Kixtart change?

Thanks for the new info. You guys are the greatest!

[Smile]


MCA
(KiX Supporter)
2002-07-02 03:58 AM
Re: Kixtart change?

Dear,

Which release you were running?
What is your actual release now?
See UDF forum for a function which will return also the OS value.
greetings.