Using the following code as the test:
 Code:
;Windows Backup Settings
$=SETOPTION("Explicit","ON")
$=SETOPTION("WrapAtEOL","ON")
$=SETOPTION("NoVarsInStrings","ON")
$=SETOPTION("NoMacrosInStrings","ON")
dim $A,$H,$N,$T,$X,$EXC

;Restrict to target machines
If InStr(@PRODUCTTYPE,'Windows 6.1') or InStr(@PRODUCTTYPE,"Windows 7") and not instr(@WKSTA,'-VDI')
 $A="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsBackup"
;$A="HKEY_CURRENT_USER\TEST"
 ;Include Excluded files setting if set
 $EXC=join(split(trim("\Pagefile.sys|\hiberfil.sys|%TEMP%\* /s|%Systemroot%\temp\* /s|*.ost|*.iso"),'|'),Chr(124))
 If$EXC<>''
    $=WRITEVALUE($A, "FilesNotToBackup2", $EXC, "REG_MULTI_SZ")
    ? '['+@error+"] "+@serror ; Always shows 0 = OK
    sleep 5
  EndIF
EndIf


We only use wkix32 but for this test I used kix32.
Run this script normally and you get [5] Access is Denied but Run as Administrator = [0]
However the registry is not updated and the value is not added.
Include $=SETOPTION("Wow64FileRedirection","OFF") in the code gives same result.
Include also $=SETOPTION("WOW64AlternateRegView","ON") and once regedit is manually refreshed it worked! :-)
Closing/Refreshing RegEdit helped; My previous mistake because when applying using a .reg file regedit auto refreshes but not with kix..
shell 'regedit /s "Test.reg" ; Does not work even when kix32 is run 'As Administrator'
Manually run a .reg file and answer prompts, works.
Repeated above with wkix32.exe and got same result.
Did same shell from VBscript and using CMD REG tools but got the same results.
DAMN annoying as has been working until recently.
Now I am stuck because I can now write SOME values with KIX but not all as no QWORD
And can't run .reg file reliably in an elevated shell.

I will persevere, if no one can re-produce then I must be missing something. Updated the AV over the weekend which may have helped.





Edited by MACE (2013-09-17 02:19 PM)