There is an error when running the WMIQuery()function at:
Exit Val("&"+Right(DecToHex(@ERROR),4))

Error message:
ERROR : Error in expression: this type of array not supported in expressions.!
Script: D:\Kixtart\os.kix
Line : 28

Kudo