I've got an issue where a certain file in my installation might already exist. If it does, I want to overwrite it with the file included in the install. However, it isn't being overwritten. I'm not sure what I'm doing wrong but here is an example project.
To recreate:
Install.
Copy the only file it installs (temp.tmp) to the same directory; so there is "temp.tmp" and "copy of temp.tmp" in the same directory.
uninstall.
rename "copy of temp.tmp" to "temp.tmp" and change the contents of the file so you can know if it was replaced.
Install again.
The second install appears to work normally but temp.tmp never gets overwritten with a fresh copy. It still has my changes in it. What am I doing wrong?
File Attached:
My Installation Project.mia
Can't overwrite file
If you double click the Install Files command for the file tmp.tmp in the code editor are there any check boxes marked?
And, the beset way is to inlcude the *.mpr file with the *.mia file in a zip so we can open the project.
And, the beset way is to inlcude the *.mpr file with the *.mia file in a zip so we can open the project.
Jim Oswell
Software Engineering Manager, Dental
Greenway Health, LLC
http://greenwaymedical.com
Software Engineering Manager, Dental
Greenway Health, LLC
http://greenwaymedical.com
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Windows Installer internally manages overwrites. So what you want to do is make sure your file has a newer version, or if that is not possible (like a plain text file), a newer date. Then the overwrite will happen automatically.
If you would like to force an overwrite, you can do that too. Just delete the file manually before installing the new copy. You can use the DeleteFileA API in kernel32.dll with the Call DLL Function plug-in to do this.
If you would like to force an overwrite, you can do that too. Just delete the file manually before installing the new copy. You can use the DeleteFileA API in kernel32.dll with the Call DLL Function plug-in to do this.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 150 guests