I just did a quick search on your Userenv 1517 and 1524 errors. It appears those may be coming from your AV.

This is definitely a strange kix issue and likely only in your environment. The "unknown" error is interesting because in the past I've only seen that when the macro was enclosed inside a string, which based on your code above it is not. It's possible you have a missing quote somewhere.

I would start by looking for a stray quote, or search the board for Sanity and run your code through it.

The only other thing you can try is to test for the "unknown" ...

 Code:
if instr(@producttype,"unknown")
  ? "something is wrong"
  ;do something like exit the script
endif 


By the way... if you have a number of users all writing to that INI... you are likely being overly optimistic that is catching them all. I would suggest making an error file for each pc instead and put them in a common folder.
_________________________
(... better days ahead)