ProgramFiles64Folder property modified to C:\ - wix

We have created an installer with wix. It is working fine on my machine. But on one of the client's machine it get installed in C:\ drive. When I checked the log file, I found this line
MSI (c) (24:28) [16:33:31:142]: PROPERTY CHANGE: Modifying ProgramFiles64Folder property. Its current value is 'C:\Program Files\'. Its new value: 'C:\'.
Do anyone have any idea about it??

We are able to find the solution. User was doing administrative installation of the product by using below command:
msiexec -a "path-to-msi" -l*v <logfilename>
As a workaround, user should use the following command:
msiexec -i "path-to-msi" -l*v <logfilename>

Related

Install msi in the same path where msi is located

I'm building a msi installer using wixtool. I'm able to install that msi in any location, by browsing the directory.
I'm trying to simplify the installation steps. What I need is I want to install the msi installer in the same path where the installer exists.
For example if I have my msi installer in D:\test directory, then it should install the same in D:\test directory without asking for the path to install.
Please help, Thanks.
The Windows Installer sets the OriginalDatabase property to the path of the installation database used to launch the installation. If the installation is launched from a command line, the value depends on whether the recache package option (the -v flag) is present in the REINSTALLMODE property.
So, you can set the TARGETDIR to the value of the OriginalDatabase property

Unable to uninstall software installed using Wix MSI installer

I used the Wix tool in Visual Studio 2015 to generate an msi in a custom directory - not in Program Files. The software got installed alright (only for current user) but I am unable to uninstall it.
The error shown is: The specified path 'H:\Config.Msi\' is unavailable.
However, a folder with name exists at the specified path. Also, the uninstallation succeeds when I delete the contents of the folder created by the installer.
Any ideas on how I can get the software to uninstall cleanly?
The problem was that the referenced path H: was a virtual drive that caused the error. Mapping TARGETDIR to reference the correct path was a work-around. For my use case, this was sufficient.

Set WIX MSI Package to write log to same file as the bootstrapper/burn log file

I have a log file that is written to the installation directory by the MSI. This log file contains code I've written to help with troubleshooting installation issues within the MSI package. The bootstrapper also has its own automatic log file. Is there a way for me to set my MSI to log to the same file as the bootstrapper?
Why do I want to do this?
If an install fails, the bootstrapper displays an error screen with a link to the bootstrapper's log file. This is the information my clients send me when they have problems during installation, but this information is useless to me. I'd love it if this log could also capture all of my MSI troubleshooting information.
You can get the path of yout bootstrapper file and store it in a variable , then when u executing the msi file
"/c msiexec /i Blabla.msi /L*v bootstrapperLogFilePath"

how to create installation log file in Target folder in wix

i am using the following command to see the logs in wix installer.
msiexec /i "D:\WixProjects\DFServicesWixSetup\DFServices\bin\Debug\DFServices.msi" /L*V "D:\DFServices.log"
but this command is trying to install the msi again.
I want to execute this command from wix after finishing the installation and log file need to save in installed folder.
can any one help me on this.
You need to decide in advance if you want Windows Installer to make a log file. You also need to decide in advance where it should go. If you want it to end up in the install folder then you either need to copy it there after installation or specify the install folder in advance, too.
In Windows Installer folders are controlled by properties. You can specify such properties in the command that starts installation. The name of the property for the "install folder" depends on how the installer authoring; INSTALLFOLDER is one typical name.
So, you could do this with a command like this:
msiexec /i "D:\WixProjects\DFServicesWixSetup\DFServices\bin\Debug\DFServices.msi" /L*V "D:\path\DFServices.log" /qb INSTALLFOLDER="D:\path"
The /qb switch is reduce the UI such that the user is offered the chance to change the installer folder. It may more may not be need for your installer, depending on what dialogs its UI normally shows.
So, the first step is to figure out which property sets the install folder in your installer.

ProgramFilesFolder Set to C:\ when using /a switch for msiexec

I have an .MSI installer that I created using WIX and works fine when opening the file from windows explorer or installing from a command window using msiexec /i. The problem is that I need to use /a to install it using a group policy when the computer turns on.
When using the /i option the ProgramFilesFolder value is set correctly to "C:\Program Files (x86)\".
When using the /a option the value of ProgramFilesFolder is set to "C:\", and then I get an error (on the Log) that says:
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2203. The arguments are: C:\Referrals.msi, -2147287035,
Note: I am not running the .MSI file from "C:\"
Try
msiexec /a TARGETDIR="c:\temp\location" /passive
I think you may have the msiexec.exe command line mixed up: /a is admin install. This is essentially a command to create a network installation point with extracted files to use for installation on a lot of computers. This ensures the source files are available for patching, self-repair, repair, reinstall, etc...
To deal with advertisement and group policy you need to use these command line options. So a very basic operation would be advertise product to all users silently and write a log file:
msiexec.exe /JM "Installer.msi" /QN /L* "C:\msilog.log"