Merge module components are remained as residues in the system . When another application is uninstalled , merge module components are left behind with log "Disallow uninstalling component since another client exist" . The problem is not sure which client is holding the files . No client is found in control panel or Windows installer Cleanup .
How to identify which client is holding file or How to remove the merge module from the system ?
Windows installer keeps track if the same components are shared between multiple packages installed on same machine. Windows installer keeps reference count of such components and allow uninstallation until all the applications use them are removed.
To find the component, Browse for the following registry:
HKEY_CLASSES_ROOT\Installer\Components
Here component GUID is repacked. So, in order to extract correct component GUID, please refer following page:
https://www.advancedinstaller.com/user-guide/faq-files-folders.html#question239
Once component id is found, search it in local machine(HKLM) hive and you should able to find which product it belongs to.
Related
I have a Windows Installer project attached to my solution, which allows the user to optionally install two components of the application (they are Windows Services) using a "Checkboxes" dialogue box which I've added to the User Interface, and then Conditions on the Custom Actions...
i.e. in Custom Actions / Install I have
Primary output from ProjectA (Active)
- Condition = PROJECTACHOSEN (i.e. the Checkbox1Property value)
Primary output from ProjectB (Active)
- Condition = PROJECTBCHOSEN (i.e. the Checkbox2Property value)
In Custom Actions / Uninstall, I've added the same two "Primary Outputs".
The problem is, if during installation the user only chose one of the two projects then the uninstaller still tries to uninstall both of services, and of course throws an error when it doesn't find the missing one, causing the uninstall to fail.
What condition can I add in Uninstall to only install the service if it's currently installed?
I've tried:
adding the same conditions as the Install - this doesn't remove the services at all (presumably because you're not ticking the boxes during uninstallation)
Condition = "Installed" which I came across elsewhere on the web. This appears to be ignored and the uninstaller still tries to uninstall both services.
you can use ?ComponentName to check install state of a component, i used it similarly few months ago.
Ive found about it in cheat sheet from flexera here
The best solution I've managed to come up with so far is:
Add a File Search "Launch Condition" for each project that checks for the existence of the .exe file that is the service, and give it a "Property" value.
Use the property value as the "Condition" of the Custom Action.
This works but I'm not totally happy with it, as it's more important that the service is deleted than the exe and if the exe goes missing it won't work and the service will remain...
Edit
Even that doesn't work unless I set the Search "Depth" to at least 3 (even though the exe file is in the installation directory and the "Folder" set to [TARGETDIR]), but if I do that, the installer takes about 20 seconds just to start up - presumably because of the time it takes to search 3 levels of subdirs. But if I set to any less than that although the installer starts quickly it now doesn't seem to find the exe and doesn't uninstall the service...
Shouldn't [TARGETDIR] reflect my installation directory and therefore work with a depth of 0?
I have created SAP add-on Project in B1 Studio. I was trying to create the installation file for this. But I am facing many difficulties while doing it as I have not done this before and I am unable to find proper documentation for so.
I followed following steps to create one.
Created add-on using add-on installer.
In add on registration wizard I gave address of the newly created .exe file.
I created one more folder and pasted all these file in that along with my project's .exe file and interlop dll.
In sap I registered the add-on and tried to install it.
But it is giving me no executable file found error.
If you are using SAP 9.0 or above, you can create an extension package. Go to the SAP installation directory and find the ExtensionPackage.exe
Path can be something like this
C:\Program Files (x86)\SAP\SAP Business One SDK\Tools\ExtensionPackage
Run this application and enter all mandatory fileds in Basic
information
select the 32 bit version / 64 bit version of your application
select additional files if needed.
mark to register 32/64 bit dlls if needed
click package button to save it.
Now you can go to your SAP Business one and open Administration > Add-ons > Add-On administration
click the Manage Extensions for Lightweight Deployment [this should open the control center in a web browser]
login using your B1site user ID n pass which will take you to extension manager.
Use import to import the package you created
Use Comany Assignment to assign to the correct SAP comapany.
Login to the SAP company to install the extension.
This should be pretty simple, but I can't seem to get it. I have a setup project (VS2010) that packages a few dozen image files (along with my SQLite file) and copies them to the user's computer when the program is installed. As these are essentially "stock" images, it's ok if the user deletes them (there is functionality to do so from within the program.) However, after one or more of these images have been deleted, the next time the program starts it gives a "Windows installer" dialog box, and deletes all of the remaining data files!
What I think is happening is the program sees the missing files, assumes the installation has been corrupted, and tries to go into some kind of recovery/uninstall mode. I'd like to know how to indicate in the setup project that the files need to be installed, but may be removed by the user at any time.
I have tried several combinations of File properties, and nothing seems to do quite what I want, which is for my installer to put them where I say and never think about them again. Do I have to reinvent the wheel and do this through a custom action??
EDIT: Transitive and Vital had both been set to True. Setting them to False causes the program to re-add the deleted images back after it has been restarted! I'll probably go with a custom action if I don't get an answer.
When using a file association or advertised shortcut Windows Installer automatically checks if component key paths are missing. If a key path is not found, a repair is trigger to reinstall the component.
Most likely your installer repair process does something that removes the other files.
A solution is to not register your components with Windows Installer. This is done by using a null component GUID and it's not supported by Visual Studio setup projects (it is however supported by most of the other setup tools).
Another solution is to make sure that your image files are not key paths in their components. This is also not supported by Visual Studio.
If you want to use a setup authoring tool which offers more control, you can take a look at this list: http://en.wikipedia.org/wiki/List_of_installation_software
I am using windows installer to create setup project.
How I can remove/delete application files from AppData\Roaming folder when application uninstalled.
I tried added a special folder and set DefaultLocaltion to [AppDataFolder] but it didn't working.
Do I need to do anything else?
I'd need to understand what you are trying to do to give you specific advice. In general what you are trying to do would be OK removing files from CommonAppDataFolder but not AppDataFolder as trying to clanup user data from multiple user profiles is not a best practice. Additionally trying to cleanup Roaming Profile User data is outright impossible because the other users aren't logged on.
You'll want to read:
Managing Roaming User Data Deployment Guide
Assuming you are trying to do what I think you are, you'll need a cleanup script / exe that you leave behind on uninstall and a custom action to write to the registry during uninstall ( MSI can't do this natively ) to call that script/EXE. You'll want to leverage the Active Setup trick as described here:
Using Active Setup to Repair User Settings
The way it'll work is your uninstall leaves the EXE and registry entry behind so that when a user logs on it's roaming data gets pulled down from the server to local and Active Setup realizes it hasn't run the script yet. The script runs (once) and the data is deleted. When the user logs off the data is replicated / deleted on the server. Then they log on again it doesn't run again.
By default Windows Installer does not remove the files created by your application, after the installation. To do that you need to either write your own custom action, that will run upon uninstall, or depending on the tool used for authoring the MSI, you can use built-in options for cleaning the application locations, as some tools have this support.
I created a setup for my product targeting Windows XP and later, to be installed using windows installer (WI). The resulting .msi file has a product code, let's say PC1 (actually a guid), and an upgrade code UC1 (also a guid). After some time, I created a new setup for a newer version of my product. The new .msi file has a new product code PC2 and the same upgrade code UC1 (also called a major upgrade). My company wants to install the .msi file with our own installer. For that, we basically use MsiInstallProduct to install the .msi file, while the entire UI is in our own install program (and we use MsiSetExternalUI to ask WI to send us notifications). The problem that I am having is the following:
if the two builds of the product are installed on the same machine using "msiexec /i myapp.msi" then there will only be one entry in the "Add/Remove Programs" of "Programs and Features" control panel applet. or in other words, during the installation of the new build, the old one is uninstalled.
if the two builds are installed on the same machine programatically using MsiInstallProduct, there will be two different entries in control panel.
Once again, only if I try to install it programatically (using either MsiOpenPackage+MsiDoAction or MsiInstallProduct), the upgrade does not happen and I end up with two entries in the control panel. I also found that if I do not set an external UI callback using MsiSetExternalUI, before calling MsiInstallProduct or MsiDoAction, then the upgrading part of a new installation also works as expected, no duplicate entries in the CP.
The callback that I use for MsiSetExternalUI is basically the same as the one in this MSDN article:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa368786(v=vs.85).aspx
What can I do (or what I need to handle in my callback) to avoid having duplicate/multiple entries in control panel?
Thanks and best regards,
Levente
Re our comments above, I did a google search for CLIENTUILEVEL and the first several hits indicate to me that CLIENTUILEVEL having a null value is normal and that REMOVE=ALL is working. The comments indicate to go a little furthor down the log and find out why the uninstall (Remove existing products) is failing. If you could email me a complete log file ( chrpai#iswix.com ) I could look through it for you.
RemoveExistingProduct standard action
Link to article describing how to interpret Windows Installer log files (see comments)
RemoveExistingProducts running but not uninstalling Options
I ran into the same behavior with my ManagedMsiExec sample project: http://blogs.msdn.com/b/delay/archive/2012/01/09/make-things-as-simple-as-possible-but-not-simpler-managedmsiexec-sample-app-shows-how-to-use-the-windows-installer-api-from-managed-code.aspx
Changing the logging behavior of my app didn't help in my case. But after (independently) noticing the same "CLIENTUILEVEL= REMOVE=ALL" strangeness in the logs, I found a workaround which was to explicitly call MsiSetProperty and set CLIENTUILEVEL to 0 before calling MsiDoAction.
This appears to me to be a bug with Windows Installer itself (incorrectly setting CLIENTUILEVEL during RemoveExistingProducts), but perhaps there's something else going on I don't understand. At any rate, I've had success with this change and maybe others can, too. :)