This is what i use from your WMi query to the ini file.

code:
  
; Writes information to the an INI file
; Example: $Comp = CHECKREG($COMP,"MANUFACTURER")
Function CHECKINI($VALUE,$WHERE)
$ini = ReadProfileString($inifile,@wksta,"$where")
If $ini = " " OR Len($ini) = 0
$ini = "N/A"
EndIf
If $Value = " " OR Len($Value) = 0
$Checkini = $ini
$X = WriteProfileString($Inifile,@wksta,"$WHERE","$Checkini")
Else
$CHECKini = $VALUE
$X = WriteProfileString($Inifile,@wksta,"$WHERE","$Checkini")
EndIf
Return
EndFunction

_________________________
You have at least 2 choices. Each choice changes your destiny. Choose wisely!