
flywang0071.5524941699341848E12 asked a question.
Registry Keys with InstallScript?
Hi All:
I follow this "http://kb.acresso.com/selfservice/viewContent.do?externalID=Q101917" to test the custom Registry with my InstallScript,
but it doesn't work when I uninstall my program.
My script just these lines
--------------------------------------------------------
function OnBegin()
begin
Enable ( LOGGING );
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
RegDBCreateKeyEx("SOFTWARE\\ARegistryTest\\Subkey\\MyTestValue", "");
end;
To remove something you need to do an
if MAINTENANCE then
//stuff to do on maintenance/uninstallation
For example, my service has to be removed on uninstallation and so I used this code:
function RemoveService (hMSI)
begin
//the code inside this if, will only run on maintenance/uninstallation
if MAINTENANCE then
//This code removes the service created above.
ServiceRemoveService ( "SchedulingServer" );
endif;
end;
Keys installed with RegDBCreateKeyEx are logged for uninstallation unless logging is disabled.
So I should not do that for JimmiLee says...
Thanks for your ardent.