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: Uninstalling user ini files
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
‎Dec 04, 2008
03:30 AM
Uninstalling user ini files
I have an InstallScript MSI project. The installer creates/writes ini file into C:\Documents and Settings\All Users\Application Data\\. As InstallShield installed these files here during installation, it does also remove them on uninstall.
Now, when the user runs the application, he might change some settings for himself only. In that case, the application writes the ini-files under C:\Documents and Settings\\Application Data\\. These files do not get removed on uninstall.
These files do however not make sense leaving on the PC once the application is removed. Is there any way to make InstallShield remove these files?
Now, when the user runs the application, he might change some settings for himself only. In that case, the application writes the ini-files under C:\Documents and Settings\
These files do however not make sense leaving on the PC once the application is removed. Is there any way to make InstallShield remove these files?
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 04, 2008
09:36 PM
While it does not make sense to leave behind files, unfortunately, it is a known MSI limitation that files not found in the current user's folders or common folders are left behind.
You might cautiously consider a custom action which iterates through all user profiles--but if not done carefully you might not have sufficient privileges or you might delete things best left behind.
Although, maybe I misunderstand the scenario. Are the files put there merely upon installation of the package or by your application?
You might cautiously consider a custom action which iterates through all user profiles--but if not done carefully you might not have sufficient privileges or you might delete things best left behind.
Although, maybe I misunderstand the scenario. Are the files put there merely upon installation of the package or by your application?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 05, 2008
01:39 AM
Thank you for your reply.
When the application is installed for all users, the installer puts ini files into
C:\Documents and Settings\All Users\Application Data\\
These files are also removed by the installer.
But when a user runs the application, the application saves private settings into
C:\Documents and Settings\\Application Data\\
These files are left behind when uninstalling.
I think I will need an installscripts iterating through all Application Data folders. AppDataFolder does not fully help here as it gives the full path. I should somehow retrieve from it the base part (C:\Documents and Settings\) and the specific part (Application Data\\) in a way which works as well on XP as Vista, whatever language of Windows...
When the application is installed for all users, the installer puts ini files into
C:\Documents and Settings\All Users\Application Data\
These files are also removed by the installer.
But when a user runs the application, the application saves private settings into
C:\Documents and Settings\
These files are left behind when uninstalling.
I think I will need an installscripts iterating through all Application Data folders. AppDataFolder does not fully help here as it gives the full path. I should somehow retrieve from it the base part (C:\Documents and Settings\) and the specific part (Application Data\
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 05, 2008
10:47 AM
But when a user runs the application, the application saves private settings into
C:\Documents and Settings\\Application Data\ \
These files are left behind when uninstalling.
That explains it. New files, those not included in the installation package and modified files (ie. like the application saving private settings) are explicitly left behind by MSI at uninstallation.
In this case, if you want to leave no foot prints behind, yes these files will need to be cleaned up rather manually; through a custom action of some sort.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 05, 2008
03:59 PM
Note that some installation authors intentionally leave behind the user-specific files in case the user wants to reinstall the software. (If the user-specific files are uninstalled and then users have to reinstall the software, they have to reconfigure everything.)
-Just something to think about.
-Just something to think about.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 08, 2008
06:41 AM
Not sure if you can use it since you have unknown users
but maybe it will help
http://msdn.microsoft.com/en-us/library/aa371201(VS.85).aspx
but maybe it will help
http://msdn.microsoft.com/en-us/library/aa371201(VS.85).aspx
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 09, 2008
10:28 AM
I ran across a posting by Susan Gorman at Lifestyle of the MSIdle that goes into some of the ups and downs of cleaning up user data... Common Task: Optionally Cleanup User Data on Uninstall
In the comments she explains that she uses the native MSI tables instead of custom actions to leverage the table driven aspect of MSI allowing this functionality to be more readily seen (assisting in the maintainability as well).
In the comments she explains that she uses the native MSI tables instead of custom actions to leverage the table driven aspect of MSI allowing this functionality to be more readily seen (assisting in the maintainability as well).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 10, 2008
04:05 AM
Thanks for the replies.
I finally wrote an InstallScript which cleans up the ini files and the directories where the are located (if the folders are empty).
I finally wrote an InstallScript which cleans up the ini files and the directories where the are located (if the folders are empty).
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)