Created a bootstrapper which install few of the components. But if any on the component fails under mentioned dialog is shown. Is their any way to change the shown system message text?
The bootstrapper engine is located under C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Engine. In this directory there is a folder for each language with the strings. For English look in en\setup.xml.
Related
I have a Wix bundle which allows users to customize installation directory and passes the value to the package during installation. This is implemented using the approach described in this answer: How do I pass a default 'install location' to the RtfLicense bootstrapper?
If the user does not change install directory after running bundle and uninstalling it all files are deleted as expected. If the user does select another installation directory and runs bundle and uninstalls the app the files are not deleted. I guess this happens because the bundle passes default directory but it obviously isn't there. What's more the shortcut that's created during installation is deleted as the shortcut location does not depend on the installation directory.
How can I solve this issue?
The "install location" is not saved by the bundle. The packages have to save anything they need upon installation and read it back during other operations. For an MsiPackage, this is typically done using the "Remember Property" pattern. Directory paths are manipulated as properties so save any directory paths you need.
I am writing an installation script using WIX and have a question that arises in regards to the user selected location for installation. The program that needs to be installed needs to be installed at the root drive C:/, D:/, ext for the program to work. Using the Wix UI package WIXUI_INSTALLDIR the user can change the path that the program is installed too what I want to do is to make it impossible for the user to change anything except the root drive ie change D:\usr\sparrow\bin ---> C:\usr\sparrow bin if they so desired. Does anyone have any suggestions about how this might be accomplished?
You can do this with a custom action and a custom dialog, but I wouldn't do this. It is a lot of work, and doesn't seem to have any major benefits.
If I were you I would remove the chance to install to a custom location altogether. However, if the setup is run by command line, you won't be able to control what path they specify for TARGETDIR / INSTALLDIR anyway, unless you add a custom action check to abort the setup if the path is not to be allowed:
msiexec /i setup.msi TARGETDIR=c:\anypathcanbewrittenhere
I have a problem which is related to the execution of CopyFile on change/repair when using WIX to make a msi setup.
I have a feature which has a component which copies/moves a file from the source folder to a folder already present somwhere inside a users system. It is not the folder of my application. I am only moving this file and not installing it to the the target. This feature works fine if I install it using a complete setup. But when on initial install I chose not to install this feature and then try to install it during a " change " all other custom actions/components inside the feature are executed/installed except for the CopyFile component. This is critical to my setup and if it does not get copied my setup will fail.
Just wondering if anyone found a solution to a similar problem or ever came across a similar issue?
The component which contains the CopyFile operation is configured incorrectly. It should have an actual file or registry entry as a key path.
Although Windows Installer uses components to manage resources, the component key path is main factor which decides if the component is installed or not.
So a component without a resource as a key path will never be installed and the CopyFile operation it contains will never be executed.
I am developing an MSI installer by using WiX.
The main program installs to [APPLICATIONFOLDER]. I use the InstallDirDlg to set the directory of this without any issues.
I'd like to display a custom dialogue based on the InstallDirDlg to specify a directory to install a particular component. I'd like to set the default directory to [APPLICATIONFOLDER]\Resources. However when I run the installer, I get an error, code 2343.
I think this may be a problem with displaying a second level folder in the dialogue.
You could take a look at how this is done in the WixUI FeatureTree UI example. In particular, look at the CustomizeDlg.
The error 2343 means "Specified path is empty.", so you have probably set a property incorrectly. Looking at the log files generated by your installer may also help.
Should I wrap all the files I want to install in individual components?
What is the advantage of putting several files in one component?
One reason for "one file per component" is resiliency. When an application is started, Windows Installer can check whether the keypath of any component is missing. If the keypath is missing, the component is reinstalled/repaired.
If a component has multiple files, then only one file can be the keypath. In wix you indicate this by setting KeyPath=yes on a File element. The other files will then not be fully protected by Windows Installer resiliency. They will only be reinstalled if the keypath file goes missing.
Another reason to have "one file per component" is when installing files to locations where they may already be present (e.g. an application upgrade, or when installing to c:\windows\system32). Windows installer determines whether a component needs to be installed by checking the keypath. If the keypath is a file and the file is already there (with the same version or higher) then the component is not installed. That's a problem if the other files in the component actually needed to be installed/upgraded.
I follow the Microsoft approach which is also used by InstallShield: http://msdn.microsoft.com/en-us/library/aa368269(VS.85).aspx
The above link gives the advantages of this approach.
The relevant part is:
Define a new component for every .exe, .dll, and .ocx file. Designate these files as the key path files of their components.