When trying to write an entry into the registry (specifically the Windows Run key) on a Windows XP system, it fails:
$test2 = RegWrite('HKLM\Software\Microsoft\Windows\CurrentVersion\Run', 'FHCServicesPortalUpdate', 'REG_SZ', 'C:\FHC_Tools\new.Portal\new.PortalSvc.exe')
MsgBox(262144,'Debug line ~' & @ScriptLineNumber,'Selection:' & @lf & '$test2' & @lf & @lf & 'Return:' & @lf & $test2) ;### Debug MSGBOX
; fails to write
I have tried various things with no success. If I just change the data string slightly that gets written the code works just fine. For example, this code works:
$test2 = RegWrite('HKLM\Software\Microsoft\Windows\CurrentVersion\Run', 'FHCServicesPortalUpdate', 'REG_SZ', 'C:\FHC_Tools\new.Portal2\new.Portal2Svc.exe')
MsgBox(262144,'Debug line ~' & @ScriptLineNumber,'Selection:' & @lf & '$test2' & @lf & @lf & 'Return:' & @lf & $test2) ;### Debug MSGBOX
; works just fine
Windows 7 (with the #RequireAdmin) has no problems.
I have already checked the Registry permissions and my "administrator" user has Full access.
Any Ideas why it won't work?