I have an application we created with a file that is now being placed by the executable on first launch and not the installer. I need to remove the file from the installer so the executable won't see it, but not from the destination computer. This will allow the users' to keep thier edited version of this file, while new users (first installers) will get the updated version. No matter what I try, the file is deleted from the destination computer. The file's componant is marked "Keep Installed on Uninstall", and "Never Overwrite if KeyFile exists."

I use Wise Installation Studio v7. Any help would be graetly appreciated.
0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


I'm a bit uncertain as to what you are actually trying to do. You install an .exe. When launched, it creates a file that you want to keep? Since it is not part of the actual installation, it should be left behind on uninstall.

This is confusing...

I need to remove the file from the installer so the executable won't see it, but not from the destination computer.

If you can clarify a bit I might be able to help as I just moved away from Wise Installation Studio v7.
Answered 03/14/2011 by: Superfreak3
Second Degree Black Belt

Please log in to comment
Say the file is called MyConfig.ini. What you do is rename it to MyConfig.Tmp and have the MSI lay it down in the relevent directory. You then run a custom action that runs on install that checks to see if MyConfig.ini exists in the directory and if it doesn't it copys MyConfig.tmp to MyConfig.ini.
Answered 03/15/2011 by: t_claydon
Senior Yellow Belt

Please log in to comment
To clarify, the old version's installer placed the file in the My Docs folder. The user then edits the file. In the new version, this file should no longer be placed by the installer, but by the exe. If the installer places it, the edited files may get overwritten, and the exe won't place it, because the installer did, so no changes to the file will be sent to the new users. Hope that helps (it's still early here...)
Answered 03/15/2011 by: kpm30519
Yellow Belt

Please log in to comment
My Docs folder
No matter what I try, the file is deleted from the destination computer

What is the value for the ALLUSERS property in this package? Also, are you installing using a distribution system? If I'm not mistaken, files that go into the users' profiles do not get placed by the installer during initial install if ALLUSERS is set to 1, this is the realm of self-healing or ActiveSetups. So it's kind of strange to me that these files get deleted on update or uninstall, since this is not default Windows Installer behaviour.

Maybe there's some custom action or ActiveSetup/Runonce that does the cleanup of these files, and that gets put in place upon uninstall of the package?

If ALLUSERS is set to 2, and you're using RemoveExistingProducts to do the upgrade, can you tell me where the RemoveExistingProducts is scheduled in the Execute Sequence?

Answered 03/15/2011 by: pjgeutjens
Red Belt

Please log in to comment
Did the original version of the installer not have the "Leave installed on uninstall" (AKA "permanent") and "Never overwrite if key path exists" attributes set on this particular file's component? If the package was already installed on the user's machine before you changed these attributes, it's too late. You can't change an installation that's already been installed on a user's machine. However, you can try patching (ugly) to apply the changes to the component.

If you are looking to fix an installation that you did wrong originally, and you're not looking to patch, you'll likely have to build a new installer that compensates for this mistake and backs up/restores the file on upgrade. Alternatively, you can write a wrapper script for your package that handles the backup/restore operations outside of the MSI.
Answered 03/15/2011 by: mazessj
Blue Belt

Please log in to comment