|
|
|||||||
I am new to KIX and just trying to figure this out. I need to work with an existing script that I have not seen yet. But I am told that I will need to exit if the OS is windows 10. IF @PRODUCTTYPE = "Windows 10 Enterprise (N)" Exit 0 Will this code in the begging of the script get me what I need? A side question? Is there a way to test this? Do I need a compiler installed or I can run code from cmd? Thank you for the help. |
||||||||
|
|
|||||||
There are examples of this scattered throughout the board over the years, but finding them can sometime be tough. Depending on your needs... most basic would be Code: if instr(@producttype,"Windows 10") exit 0 endif Or with a Select Statement... Code: Select Case instr(@producttype,"Windows 7") ;do stuff Case instr(@producttype,"Windows 8") ;do stuff Case 1 ? "OS not covered" Exit 0 Endselect Create a copy of your script and rename it. Then you can easily test it without worry of effecting production code. |
||||||||
|
|
|||||||
Originally Posted By: OgeccuT .... A side question? Is there a way to test this? Do I need a compiler installed or I can run code from cmd? .... You do not need a compiler. Kix code can be written in a simple text editor like Notepad but a little more advanced editor like Notepad++ can make it easier depending on your needs. You can start the script from a command line. Code: D:\somefolder\kix32.exe D:\somefolder\script.kix |
||||||||
|
|
|||||||
Big Thank you for your answers. I downloaded KiX2010.466, that was the latest one I could find. As soon as I will get the script I need to modify will try it out. And now will try to do some testing with just echo depending on the OS. Thank you. |
||||||||
|
|
|||||||
4.67 is available in the downloads section http://www.kixtart.org/binary/distrib/KiX2010_467.zip |