This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: uninstall product + deletedir
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 27, 2007
07:56 AM
uninstall product + deletedir
Hi,
I have a basic msi project who installs some dll dotnet, xml file and so on !
When the product is remove, some file (.exe, .txt, shortcut, ..) are always prensent on the INSTALLDIR at the end of uninstallation !!!
For to try to solve this problem, i've add a installscript function :
This custom action is well executed in the sequence before installfinalize with REMOVE="ALL" as condition.
Of course, when i uninstall my product the messagebox appears and contains -1 as the returns value !!!!
If i try to place the format message(nRetDel), the result is empty !
hm hm rather boring :-), someone have some idea for how to find why my file is not remove while the uninstalling sequence and how i can solve this problem ?
Thanks for your idea
Christophe
I have a basic msi project who installs some dll dotnet, xml file and so on !
When the product is remove, some file (.exe, .txt, shortcut, ..) are always prensent on the INSTALLDIR at the end of uninstallation !!!
For to try to solve this problem, i've add a installscript function :
....
if (ExistsDir (szPathInstall) = EXISTS) then
nRetDel = DeleteDir(szPathInstall, ALLCONTENTS);
if (nRetDel = 0)then
MessageBox("all was deleted", INFORMATION);
else
NumToStr( val, nRetDel );
MessageBox("UNABLE TO DELETE FILE" + val, SEVERE);
endif;
This custom action is well executed in the sequence before installfinalize with REMOVE="ALL" as condition.
Of course, when i uninstall my product the messagebox appears and contains -1 as the returns value !!!!
If i try to place the format message(nRetDel), the result is empty !
hm hm rather boring :-), someone have some idea for how to find why my file is not remove while the uninstalling sequence and how i can solve this problem ?
Thanks for your idea
Christophe
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 27, 2007
04:39 PM
My project is an Installscript MSI, so I'm not sure if this will help or not...
But in my code, I have:
DeleteDir ( INSTALLDIR , ALLCONTENTS );
I don't capture a return value for the DeleteDir function or display any message and it seems to work fine. Also as you can see I use the variable INSTALLDIR which is automatically populated with the installation path. I think some of the other project types use TARGETDIR instead.
But in my code, I have:
DeleteDir ( INSTALLDIR , ALLCONTENTS );
I don't capture a return value for the DeleteDir function or display any message and it seems to work fine. Also as you can see I use the variable INSTALLDIR which is automatically populated with the installation path. I think some of the other project types use TARGETDIR instead.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 28, 2007
01:37 AM
Hi nmsams,
Thanks for you reply, but my variable szPathInstall is INSTALLDIR 🙂
And i don't know why when i remove the product some file (shortcut, xml, dll, exe) are always present on the target machine !!!!
It s not everytime, i have a machine xp and it's arrives everytime and on my build machine win 2003 it never arrives !!!!
I'd like to understand why it's arrives and why i can do for to solve this problem..
If you have any idea, don't hesitate 🙂
Thanks for all
Christophe
Thanks for you reply, but my variable szPathInstall is INSTALLDIR 🙂
nRetDel = DeleteDir(szPathInstall, ALLCONTENTS);
And i don't know why when i remove the product some file (shortcut, xml, dll, exe) are always present on the target machine !!!!
It s not everytime, i have a machine xp and it's arrives everytime and on my build machine win 2003 it never arrives !!!!
I'd like to understand why it's arrives and why i can do for to solve this problem..
If you have any idea, don't hesitate 🙂
Thanks for all
Christophe
![](/skins/images/3B39CE851FDD5528C393F146EB70A2D0/responsive_peak/images/icon_anonymous_message.png)