Quote:

I think that those examples are special cases that return EXTENDED information, and return 0 on success, the opposite of what this and many other functions do.




The example script I gave above returns 0 on success or the error which caused the failure. This is consistent with...

AddKey(), AddPrinterConnection(), AddProgramGroup(), AddProgramItem(), BackupEventLog(), DelKey(), LoadHive(), LogEvent(), SendKeys(), SendMessage(), SetConsole(), ShutDown(), WriteProfileString()

... and others.

Maybe I misunderstand. Wouldn't be the first time