I have written my first setup program using WIX (version 3.6). When uninstalling the application, an .InstallState file gets left behind in the app folder. Is this supposed to be removed, and if so, what do I need to add to my script to remove it?
I've searched extensively but haven't really come up with anything.
If this file is installed with your application, it should be removed automatically on uninstall.
If this file is created later, then you should add RemoveFile element with On="uninstall" into a corresponding component.
Related
This is my first question in this forum.
I've build several msi's for my installer.
All of them work.
But if I put them together with the bootstrapper the exe-File won't install the files inside of the msi's.
The Installer then starts shows that it is working on the particular msi's but in the end no new file is on the system.
Can anybody help?
Greez
Thanks for your clue.
By reading the log I found out that the exe writes to another drive than the single msi's do.
I don't know weather this is a "clean" solution but for me hardcoding the TARGETDIR to "D:\" does the job. All files are copied to the destinationfolder.
<Property Id="TARGETDIR">D:\</Property>
Before that I had used a custom action to change the rootdirectory.
That worked for the single msi's but not for the exe.
I am 100% new to WiX but I have to start off with a advanced issue and I have virtually no idea if that is even possible. I have an out of-the-box WiX project in front of me that creates a msi installer for me. But I want to deploy an external config file with it, from which a specific element will be inserted into the app.config within the msi file. I need this because I need to have custom behavior on different target machines without rebuilding for every one.
Does anyone have some kind of opinion on that?
I am using Wix to install an application. The trick here is that the application is being installed on top of another, third party application.
I am installing both using a bootstrapper.
The application I am installing on top of has a DLL that we have customized in OUR application, so I need to overlay the original DLL with ours.
What is happening is that our application installer seems to be refusing to install the DLL. The log shows this in the InstallValidate step:
Component: DotEditPanels.dll; Installed: Absent; Request: Local; Action: Null
I have tried all sorts of things to make this happen. I started with using A tag in the Component to delete the original DLL, followed by a to install it.
The component is getting skipped, as you see above.
I then went to using a Custom Action to delete the original DLL, which works fine, with just the in the Component. Same thing.
Trying a few more things, the Component currently looks like this:
<Component Id="DotEditPanels.dll" Guid="*" NeverOverwrite="no" SharedDllRefCount="yes">
<File Id="filF8E7A8CEDC214A73A82277F1BA3B677F" KeyPath="yes" Source="..\..\DotEditPanels-8.1-FP2\bin\$(var.Configuration)\DotEditPanels.dll" />
</Component>
All I need is for this new DLL to get laid down, and I can't seem to make the installer do it. Any ideas?
File overwrite rules are based on file versions, so if your file version is less than that of the installed file, that's the obvious explanation. This rule is the basis of patches, hot fixes, service packs and so on, so if your version control is doing it's job that existing version should be newer than yours. The assumption is also that Dlls like that are compatible with older apps that may already be installed.
Anyway, you mention an assembly, so if it's managed code then you can set AssemblyFileVersion to a version that will overwrite the existing Dll. Otherwise it defaults to the assembly version. If you need to keep the assembly version the same because clients are bound to it they will still be ok, then use file version to denote later versions and overwrite older versions.
I figured as much.
So, I actually "cheated". I added the DLL as a Binary object, then used a custom action to delete the original DLL and read the new DLL from the Binary object in the installer database and write it to the proper place.
Yes, I know it's probably not "kosher", but it is getting the job done for my purposes.
I created an installer based upon the code I found here. If a previous version of the app exists, I want the installer to delete it before installing the new one.
If it's a clean install, everything goes well.
If it's an upgrade, a weird thing happens. As expected, the old version is removed, the registry is changed, and shortcuts are placed on the desktop. Oddly, the primary file doesn't exist in the application folder when the installer completes.
Upon launch after an upgrade, a small installer message box pops up and states "Please wait while Windows configures -app name-..". After this quick message, the file exists as it should in the app folder, and the app launches.
Prior to launch though, it's not there. I even tried a reboot before launching the app to see if that would place the file if it's stuck in a some kind of cache.
Anyone ever see this behavior? It's a bit like this questiom, but it happens on every upgrade.
Oddly, the primary file doesn't exist in the application folder when the installer completes.
This is a common problem with windows installer upgrades if components are not managed correctly. You'll typically see that the missing file re-appears if you launch the installer into maintenance mode from the control panel and do a "repair". In this case, windows repaired the application automatically when you launched it.
A few possible explanations of the top of my head:
the new version of your installer installs this file in a component with a new GUID. This causes problems because Component GUIDs should remain stable.
your installer installs multiple files per component. This causes problems because whether a component should be installed is determined by the keypath, and only one file can be the keypath. Stick to one file per component.
The "new version" of the file actually has a lower version number. Such an "upgrade" doesn't work correctly.
i have already an installer for our application. but it is exe-file. it was created many years ago.. application of course was updated. we used a bat-file to register new dll-files and to install our service(windows). but we want to do all this by installer not a bat-file. we chosen a wix techology. i read about <Patch> node, but to use it i need an msi from previous version.. i think to do a simple installer, that will stop service,copy and register dll in the installed application's directory, install service. but i don't know will it overwrite the files without any problems?
You can only create an MSP (Patch) for an MSI (Installer). Also, you're going to run into component ref counting problems if you install your components into the same directory as the original install. The problem is MSI will go to see a file is already there, make it as a shared resource and increment the usage counters. Then on uninstall it will decrement, see that it's not 0 and remove to uninstall the files.
I'd suggest installing to a new directory and then using the RemoveFile table to get rid of the old files. Also I'd suggest following good CM / Versioning practices so that you don't have to worry about hacks such as Version Lying.
If all your application just needs to xcopy files, setup a directory and maybe even a ShortCut, it should be a piece of cake.
Versioned files like executables will automatically be overwritten if the version of the file number is lower.
See also Copy if not exist in WiX.