Click here to Skip to main content
15,883,745 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
This is my function to remove the directory after uninstalling. Basically, in my .ism file, there are 2 .rul files(setup.rul and VerGetFileProperty.rul). I have added some code to clean the directory in setup.rul. I build, and one setup.exe is formed. While I run setup.exe, it will ask me to select the db, if I select a db, its says the db server is not found. But if I run the original setup, it will auto detect db server and install. How is the setup.exe getting created? I haven't made any changes on searching for db server part. I have just created a function to remove the directory while uninstalling.

function fnClean()
NUMBER nrv;
begin
if (ExistsDir (INSTALLDIR ^ "OpenTV Account") = EXISTS) then     
    SetDialogTitle(DLG_ASK_YESNO,"Delete Logs");
    nrv = AskYesNo( "Do you want to delete all log files now? Say No if you       prefer delete them later manually.", YES );
    if ( nrv ) then     
        nrv = DeleteDir (INSTALLDIR ^ "OpenTV Account", ALLCONTENTS);    
        DeleteDir (INSTALLDIR, ALLCONTENTS);
    endif;        
else
    DeleteDir (INSTALLDIR, ALLCONTENTS);  
endif;
end;
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900