I'm confused right now since very simple code like below
Local $test = RegWrite("HKEY_CURRENT_USER\Software\Test", "TestKey", "REG_SZ", "Hello this is a test")
$code = @error
If $test = 0 Then MsgBox(0, "error", $code)
$test = RegWrite("HKEY_CURRENT_USER\Software\Test\here", "TestKey", "REG_SZ", "Hello this is a test")
RegDelete("HKEY_CURRENT_USER\Software\Test")
works very fine without showing any error sign.
I think other lines are affecting on the permissions that my program needs.