Write to registry on start and at close of program

Have been reading through docs and forum for couple of hours and cannot seems to find solution… All of my attempts have failed.

I need to write value when software opens and also when user closes. Use AutoIT and do this now, but like to convert AutoIT program to EXEOut. I use something like this in AutoIT:

OnAutoItExitRegister(“_UnloadIeException”)

_LoadIeException()
Local $oIE = _IECreate(“http://sysadmin:[email protected]/privdata”, 0, 1)
_UnloadIeException()

Func _LoadIeException()
RegWrite(“HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE”, “iExplore.exe”, “REG_DWORD”, “0”)
EndFunc

Func _UnloadIeException()
RegWrite(“HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE”, “iExplore.exe”, “REG_DWORD”, “1”)
EndFunc

Basically need to turn IE feature on and off. To recap:

Write when software starts:
(“HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE”, “iExplore.exe”, “REG_DWORD”, “0”)

Write when software is closed:
(“HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE”, “iExplore.exe”, “REG_DWORD”, “1”)

Could you give me example for using in EXEout scripting?

Thanks.

You can use HEScript and the events in UserMain script to write/read your registry entries.

For instance, WriteRegDW lets you write DWORD values:

WriteRegDW(HKEY_LOCAL_MACHINE, "Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE", "IEXPLORE.EXE", 0);

Ok, thanks!

I am missing something as that is method used. So back to inspect what I did wrong.