cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
flywang
Level 3

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;
Labels (1)
0 Kudos
5 Replies
JimmiLee
Level 6

Do you mean that when you uninstall the app, the registry isn't removed?
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;
0 Kudos
flywang
Level 3

The discussion say :
Keys installed with RegDBCreateKeyEx are logged for uninstallation unless logging is disabled.
So I should not do that for JimmiLee says...
0 Kudos
flywang
Level 3

I find the answer,I have to separate two function to do.And it's work.
0 Kudos
JimmiLee
Level 6

My bad ...
0 Kudos
flywang
Level 3

JimmiLee Don't say that.
Thanks for your ardent.
0 Kudos