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
- :
- Problems with 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
Mar 04, 2008
06:12 AM
Problems with DeleteDir
I have a InstallScript MSI Project.
I am trying during uninstallation to delete the folder with my product, but it does not work. Here is my script code.
STRING szPath, szPath2;
…..
szPath2 = FOLDER_PROGRAMS;
StrRemoveLastSlash(szPath2);
ChangeDirectory(szPath2);
szPath = INSTALLDIR;
StrRemoveLastSlash(szPath);
DeleteDir(szPath, ALLCONTENTS);
What am I doing wrong?
I am trying during uninstallation to delete the folder with my product, but it does not work. Here is my script code.
STRING szPath, szPath2;
…..
szPath2 = FOLDER_PROGRAMS;
StrRemoveLastSlash(szPath2);
ChangeDirectory(szPath2);
szPath = INSTALLDIR;
StrRemoveLastSlash(szPath);
DeleteDir(szPath, ALLCONTENTS);
What am I doing wrong?
(2) Replies
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Mar 04, 2008
01:13 PM
Where is it failing?
What are the return values of the functions you're calling?
What are the return values of the functions you're calling?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Mar 05, 2008
03:55 AM
ChangeDirectory returns 0
DeleteDir returns -1
What is failing is that the directory that I am trying to delete does not get deleted.
I have no problem deleting the directory manually.
The code runs under OnMaintUIAfter.
DeleteDir returns -1
What is failing is that the directory that I am trying to delete does not get deleted.
I have no problem deleting the directory manually.
The code runs under OnMaintUIAfter.