We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

DeadlyDonger
Posts: 19
Joined: Wed Jan 07, 2015 6:44 pm

Keep Files After Uninstall via Control Panel.

I'm not sure if this is default Windows Installer behavior but I've set specific files to only be removed through Uninstall Cleanup > Ask the user whether he wants to clean up. So this means that when the user has installed the program, If he runs the installer which he used to install the program with, the setup shows a page which asks whether he wants to keep the files. This is through Uninstall Cleanup. However, I can't seem to get this to work if I go to the control panel and uninstall it from there. Is there a certain kind of setting which I need to add in order for this behavior to work?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Keep Files After Uninstall via Control Panel.

Hello,

Please note that during the uninstall process, Windows Installer removes all the data registered into the MSI file.

If you want to prevent a file from being uninstalled, you can set the Permanent flag from the component properties of the related files. This way, Windows Installer will not remove the related files, the related files being removed by the Uninstall Cleanup operation.

Let me know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DeadlyDonger
Posts: 19
Joined: Wed Jan 07, 2015 6:44 pm

Re: Keep Files After Uninstall via Control Panel.

Dan wrote:Hello,

Please note that during the uninstall process, Windows Installer removes all the data registered into the MSI file.

If you want to prevent a file from being uninstalled, you can set the Permanent flag from the component properties of the related files. This way, Windows Installer will not remove the related files, the related files being removed by the Uninstall Cleanup operation.

Let me know if that helped.

Best regards,
Dan
Hi Dan!

So basically there is no way to do this by choice? I'm asking because what if the user decides to keeps some files at uninstall? such as settings or customization files? So if uninstalled by the installer it can be done however when it's uninstalled via. control panel it can't? and to only keep files during uninstall is to set a permanent flag? which will keep files regardless of whether the user wants it or not?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Keep Files After Uninstall via Control Panel.

Hello,

If you want to prevent a file from being removed, you can follow the steps from the How do I prevent a file or registry entry from being uninstalled or repaired? article.

If there is anything else I can help you with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DeadlyDonger
Posts: 19
Joined: Wed Jan 07, 2015 6:44 pm

Re: Keep Files After Uninstall via Control Panel.

Dan wrote:Hello,

If you want to prevent a file from being removed, you can follow the steps from the How do I prevent a file or registry entry from being uninstalled or repaired? article.

If there is anything else I can help you with, please let me know.

Best regards,
Dan
What If I want the user to have a choice? if they want to remove the file then check a checkbox if not delete them? I'm assuming you can't do this when the program is uninstalling from control panel? and the only way maybe to do this is to set some kind of operation such as mark a registry within the application so that when the uninstaller is running it will read the value and keep or delete files depending on the value correct?

Return to “Building Installers”