wix , Not able to update XML value in Change mode (without admin rights)

Not able to update XML value in Change mode (without admin rights)


Tag: wix

I have written following code in my wix installer for updating the language in an XML file and this works fine in following conditions:

1) fresh install 2) upgrade by using admin rights (I am using msiexec /I "Tools.msi" /l*v D:\InstallLog.txt).

However, when I run/execute the msi without admin rights (This is where "Change" mode is being used....what am I missing) the values are not updating always set to the default value :

       <Property Id="LANGUAGE" Value="en-US" />

Installation (Change mode)

The code:

    <util:XmlFile Id="LanguageConfig"
                  Name="value" Sequence="1" />

    <util:XmlFile Id="MappingLanguageXML"
                  File="$(var.UserMappingFile)" Sequence="1"  />

Any help is much appreciated.


The fact that it's being changed implies it may not be a privilege issue. I suspect that the scenario is that a different language was entered at install time, but you did not preserve its value anywhere so Change just uses the default value. Properties aren't remembered automatically, that's what the WiX "remember property" pattern is for. That's likely to be the solution - preserve the install time value of LANGUAGE. It's no different from running any program - the fact that the user may have entered something that went into a variable doesn't mean that the variable will have that same value next time you run the program unless you save it.


command line Start.Info.Argument error

I would like run this command with C# : "%WIX%/bin/heat.exe" dir "C:\Documents and Settings\APP" -gg -sfrag -cg Appli -out wixappli.wxs I have this code (Program.cs) : System.Diagnostics.Process process1 = new System.Diagnostics.Process(); process1.StartInfo = new System.Diagnostics.ProcessStartInfo("cmd.exe"); process1.StartInfo.Arguments = String.Format("/k \"%WIX%/bin/heat.exe\" dir \"{0}\" -gg -sfrag -cg Appli -out wixappli.wxs ", @"C:\Documents and...

Should a WiX web installer and stand-alone installer both show up in Add/Remove programs?

We have two WiX installers that use our own BA. One installer gets all the packages from the web, while the other gets all the packages from the exe. We call them "Web" and "Full" installers. We have a case where a user might install one package from the web...

Cant find File System, Registry icon in WIX setup project in Visual Studio

I installed WIX in my machine. I followed the video of https://www.youtube.com/watch?v=CoFPyIbcqN8enter link description here I can not find any way to add File Systems, no icon for it, no context menu entry on project. I am using Visual Studio 2012....

Namespace prefix 'bal' is not defined

I've got this error. Since I put below code in the Bundle.wxs. <BootstrapperApplicationRef Id="WixExtendedBootstrapperApplication.Hyperlink2License"> <bal:WixExtendedBootstrapperApplication ThemeFile="Resources\COTheme.xml" LicenseUrl="http://xxxxxx /> </BootstrapperApplicationRef> Could please anyone help me?...

How to define WIX agent requirment in TeamCity?

I have add a WIX installer project to solution in Visual Studio 2013. The project is built with every commit on TeamCity. There are several build agents connected to TeamCity cloud, but only some have WIX installed. Usually I would add the build agent requirement, so only the computer with...

How to change $(var.Platform) from x86 to Win32 in Wix

I have a Visual C++ 2013 solution including many C++ projects and a WIX installer project. On x64 platform, everything is okay. But On x86 platform, $(OutDirectory)$(Platform)$(Configuration) of C++ projects is ...Win32..., but $(OutDirectory)$(Platform)$(Configuration) of WIX is ...x86... What can I do?

Module failed to register HRESULT / Error 1001

My first question is about the error below : Module [Path/Name of dll].dll failed to register. HRESULT -2147024769. Contact your support personnel. I can continue the installation but i want to get rid of this error if possible. The second question is about the following error : Error 1001. Exception...

How do I install the Wix extension on after a Visual Studio 2013 Update?

I have installed Wix 3.9 on VS 2012. Recently, I just got VS 2013 and I am not sure how to install just the extension on there? How do I do without uninstalling wix 3.9 and reinstalling it back again?...

executing an vb script from another project bud in the same solution in C#

i am trying to call a VB script that i made that in the same solution bud in another project, it is a C# project with windows forms and WIX. i am building an .MSI installer and when i arrive at a certain form i want it to execute a...

Change Wix Product version number using NANT XmlPoke

I ran into this issue recently - when I try to replace the Wix Product version number using NANT XMLPOKE task, it returns the following error message "No matching nodes found". <xmlpoke file="..\Setup\abc.wxs" xpath="//Wix/Product[@Version]" value="${version.label}" > Initially I thought that this was an issue with XPATH statement that I wrote....

How to change Install button display text conditionally

Is it possible to change the "Install" button display text based on some condition i.e if fresh install then "Install" if upgrade then "Update"? Basically, on major upgrade i am skipping some of my custom dialogs (which are shown on fresh installation) so on InstallReady dialog i want to show...

How to add several ports to FirewallException in Wix?

I use property PORTS to pass some http ports to my installation. Then these ports will be stored into init file and used by the application. I need to add these ports to FirewallException? But following code does not work: <Component Id="fwException" Guid="MyGUID"> <Condition>Privileged</Condition> <RegistryKey Root="HKCU" Key="Software\Company\[ProductName]"> <RegistryValue Name="fwException" Value="1"...

Wix- Unable to write to XML file when using Property Name as Value

I am trying to write a value into an XML file during the installation, this value comes from a text field which user fills it during the installation stage. In my GUI file for the installer I have the following EditField: <Control Id="LogEdit" Type="Edit" X="45" Y="155" Width="100" Height="18" Property="LOGVALUE" Text="{80}"...

SHFileOperation cannot remove folder

I am writing a C++ Custom action for WiX that will be called during installation to remove any leftovers installed by the installer. Consider the following code: UINT __stdcall DeleteResidue(MSIHANDLE hInstall) { HRESULT hr = S_OK; UINT er = ERROR_SUCCESS; LPWSTR lpFolderPath = NULL; std::wstring temp; SHFILEOPSTRUCT shFile; hr =...

WiX – copy arbitrary files

The folder where my setup.exe is located contains a subfolder CALhaving files named something like xyz1234.cal – their names vary from customer to customer. These files have to be copied into a folder CAL in the target directory. So I created a CustomAction and a C# dll which uses the...

Speed up Build-Process of WiX-Installer

For my Wix project I am harvesting 4 directories, via the pre-build-event of visual studio, which will result in about 160mb of data, and about 220 files, but the build process tooks very long. How can i speed that process up? I have one embedded media.cab file which will hold...

WIX XMLConfig Different Root Element Names

I'm running into an odd issue with a "config" msi I'm writing in WIX that uses XMLConfig to check for, delete and then create the new values in a single xml file. Since I Discovered WIX I've been packaging a lot of our manual configuration processes so this is my...

Why is my Wix Custom Action is breaking my installer

I had a perfectly good wix installer when it came to moving files from the cab file to the hard drive. The problems are all being caused by the way I am writing my custom action. First, I will show the culprit, then explain the symptoms. <CustomAction Id="InstallElasticWithProvidedBatch" FileKey="fil85D231A31B2F8EB99C6B9EA4B95A354C" Impersonate="no"...

WiX: Install component based on ComboBox selection

I'm trying to create an installer which installs some components based on the selection of a Combobox but it seems like the condition isn't working. I declared the Combobox as the following: ... <UI> <ComboBox Property="Option"> <ListItem Text="Red" Value="red" /> <ListItem Text="Blue" Value="blue" /> <ListItem Text="Green" Value="green" /> </ComboBox> ......

How to add assemblies to WiX toolset setup, which comes from a nuget package?

I use the Votive-project type to create a setup with the WiX toolset. I know, that I can add an assembly like this to the setup: <File Id="FILE_myproject.dll" Source="$(var.myproject.TargetPath)" KeyPath="yes" /> What I don't know is, how can I add referenced assemblies to the setup, which comes in a nuget...

Detect if 32 or 64 bit windows and define var

I want to install Visual C++ 2012 redistribute with my app. I would like to install the appropriate version based on the architecture of the machine. eg if platfrom is x86 vcredist_filename = Microsoft_VC120_CRT_x86.ms else vcredist_filename = Microsoft_VC120_CRT_x64.ms Ive tried to accomplish in many differents ways but I cant get...

WiX error build target

I'm trying to create my MSI setup with WiX and MSBuild command which deploy my img.png into a repertory and i have this error : "MSB4019: project imported "C:\Program Files\MSBuild\Microsoft\WiX\v[[Version.M ajor]].x\Wix.targets" was not found. " Make sure that path of declaration are correct In this line : <Import Project="$(WixTargetPath)" />...

WixSharp inject multiple Custom CLR Dialogs

Using WixSharp, we can insert a custom System.Windows.Forms window as dialog . project.InjectClrDialog("ShowCustomDialog", Dialogs.InstallDirDlg, Dialogs.VerifyReadyDlg); [CustomAction] public static ActionResult ShowCustomDialog(Session session) { return WixCLRDialog.ShowAsMsiDialog(new MyCustomDialog(session)); } The MyCustomDialog is derived from WixCLRDialog class. If I have consecutive custom dialogs ( done in System.Windows.Forms ) to show. How do I insert...

how to skip dialog based on selected feature

I want to add a custom dialog in the UI sequence after the Feature selection (Customize) dialog. The feature selection is done through a Feature tree. How can I figure out if a particular feature was selected and launch the custom dialog? Right now I am having the following codes...

Wix - copy file based on combobox property

When installing an application using Wix, I would like to copy a file to a location based on a ComboBox property then a PushButton with <Publish Event="DoAction" Value="CustomAction">1</Publish>. If I use a Custom Action for this and set Execute="immediate", then the file copy fails with the error UnauthorizedAccessException was unhandled...

Create a new user with an underscore in the name

I am trying to create a user in WiX, using the following XML: <Component Id="cmp_MyNewFolder" Guid="*"> <util:User Id="MyNewUser" CreateUser="yes" Name="DUMMY&#95;USER" Domain="[ComputerName]" Password="" PasswordNeverExpires="yes" RemoveOnUninstall="yes" UpdateIfExists="yes" /> <CreateFolder> <util:PermissionEx GenericAll="yes" User="DUMMY&#95;USER"/> </CreateFolder> </Component> I've removed the GUID and password for this post, so the issue isn't with those. The problem is...

How can I change the text in the Wix installer dialog?

My text message is stuck to "Install My Product to:" How can I change this? ("My Product" is the name of my product and the string above is resolved based on the Name attribute in my Product.wxs). I have 2 dialogs and the second requires a different message....

WiX - not executing custom action during update

I have two custom actions (immediate and deferrend). I would like to skipping actions during upgrade. I tried: <Product Id="*" Name="$(var.ProductName)" Language="1033" Version="$(var.Version)" Manufacturer="$(var.Manufacturer)" UpgradeCode="{GUID}"> <MajorUpgrade DowngradeErrorMessage="Newer version is already installed." /> <Custom Action='CAa' After='InstallInitialize'>NOT Installed AND NOT PATCH</Custom> and: <Custom Action='CAa' After='InstallInitialize'>NOT Installed AND NOT...

No environment variable set after installation of MSI generated by WIX

My WSX file looks like this: https://gist.github.com/pyeremenko/891eceb779197e4be240#file-sample-wxs-L23-L25 Copying works fine, i.e. exe file available in Program Files/test/my_test folder, but I can't access TEST env variable after installation via echo %test% (of course I reload cmd) I tried also to look for it in System Properties > Environment Variables, but there...

Dealing with shared registry values

I'm working on an installer that's creating registry values and deleting them on uninstall. However some of the registry values I'm working with could be shared with other companion applications. I only want it to remove the registry values if it's the only component using those registries. If other apps...

Msi & exe singing Microsoft Authenticode requirments

I am trying to sign my small application, following this tutorial: In the tutorial they did not ask me to purchase Microsoft Authenticode Certificates I need to Removes "Unknown Publisher" security warnings; after I signmy msi and exe files I still have "Unknown Publisher" Can I sign my msi or...

Service dependencies are causing my wix msi to force a reboot on uninstall

I have spent the past 3 days running in-place while tracking down the cause of forced reboots on my system, but have finally narrowed it down to a very specific cause. I have a service suite that I am working on in Wix. There are 10 msi's that are all...

How to launch executable after installation (exe is delivered by .msm)

I did everything as explained in tutorial, but my executable wasn't launched after product installation completed. There is a nuance that my executable is delivered with .msm module, so in .wxs file for .msi I do the following to launch application: <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Product> <!-- I omit here features and...

How to change text style of the Title & Description text controls of a WiX dialog?

Where can I find information of the Style values for a text control of a WiX dialog? For example, the default text style used for the WiX dialog Title control is {\WixUI_Font_Title} & I would want to use the same style but to change the color to White. For the...

WiX: VS2013 How to change output directory

I have a WiX project in VS2013. The output directory in wixproj is: bin\$(Platform)\$(Configuration)\ by fact it is \bin\x64\Release\en-us How and where I can change the real output to \bin\x64\Release\ ?...

WIX-Installer ServiceControl “sufficient privileges” error

Visual Studio 2015 RC Wix v3.10.0.1726 I am creating a installer for a windows services. I've tested the service with InstallUtil and it runs fine. Unfortunately I'm having a bit of troubles with wix, here is the exact error - "Service 'Service Name' failed to start. Verify that you have...

Database changes management in installer updates

How can I run a series of database scripts depending on some condition? Basically I want to check build installed on user's machine and then want to run all the scripts till the build in the installer. Say user has build number 4.10 installed and if he goes to install...

WiX - upgrade services

I Installed my application in version. Services have been installed on the user account (with username / password). How to make an update, so the user does not have to specify login and password again? <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />   <Component Id="MyService" Guid="MyGUID"...

Retrieve x64 Program Files path from 32-bit process

First some background. I have created a WPF bootstrapper application for my WiX installer where I need to retrieve and display the default install location. Unless I am doing something wrong it appears the executable created by WiX is always 32-bit even if my Visual Studio configuration is set to...

Single Package Authoring

I am trying to create Single Package Authoring installation using following tutorial - http://www.egoroff.spb.ru/blog/62003.html Main wix file is following: <?xml version='1.0' encoding='windows-1252'?> <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'> <Product Name='Foobar 1.0' Id='GUID' UpgradeCode='GUID' Language='1033' Codepage='1252' Version='1.0.0' Manufacturer='Acme Ltd.'> <Package Id='*' Keywords='Installer' Description="Acme's Foobar 1.0 Installer" Comments='Foobar is a registered trademark of Acme Ltd.'...

Deploy Any CPU build with WiX to x86 using MSBuild

I have a set of solutions that build a complete .NET Any CPU application. I have a WiX project that will deploy that application as x86 and I can run this all manually in Visual Studio 2013 without any issues. Now I'm trying to get this to work in MSBuild...

Package the .Net redistributable in my burn bootstrapper

I'm trying to package the .Net 4.5.2 redistributable into my burn application, by following the instructions on this page. But it fails to find the file in the temp burn location. According to the log burn tries to find the file here: [0A14:09C4][2015-05-12T16:48:52]w343: Prompt for source of package: NetFx452Redist, payload:...

Error allocating file install folder in WIX 3.9

I am setting up the installation locations for my installer. However, it throws an error when I try to set the locations. Source code: <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Product Id="*" Name="Wix_setup" Language="1033" Version="" Manufacturer="Frank Jansen" UpgradeCode="37a42e55-dea8-47da-8f4f-fb065dd38a9e"> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> <MajorUpgrade DowngradeErrorMessage="A newer version of...

Is Component/@Guid attribute is a MUST in case of producing MergeModule

In my .wxs file for components, there are only components with single file, and this is the case for generatable GUIDs. But it seems to me that for .msm (merge module), component's GUID should be explicitly specified. Or I'm free to use Guid="*" and that would be OK? I tried...

ExePackage does not run elevated although PerMaschine is set to “yes”

In my WIX-Bundle, i have an ExePackage like the following: It executes a ConsoleApplication which tries to open an write to a HKLM-Registry entry which fails when triggered out of the bundle. In cmd, everything works fine when executed as admin: <ExePackage Id="SqlServerAuthConfig" DisplayName="Configuration of SQL-Server Auth-Mode" Compressed="yes" PerMachine="yes" Vital="yes"...

Creating a silent installer for a MSI

What is the best way to make a silent installer (or unattended) for a program that was already created and has a msi installer? At work I'm told to create an installer that is automated and does all the interaction with the user automatically so that the user essentially just...

Wix Toolset install C++ 2010 Redistributable

I can integrate together on installation package Wix Toolset the installer Microsoft Visual C ++ 2010 redistributable? I tried this with a custom action, but it does not install if another installation is in progress. Someone would have any suggestions of how to do? Also another question. I can call...

Trigger uninstall and Repair of previously installed product

i am new to Wix toolsets. i have successfully made my first installer in Wix but now i am confused about my software updates which usually are minor. in my installer i want to check if user have any older version installed then i want to show him three options...

I don't want install a Bootstrapper Project itself

I am using VS2012+WiX3.9. Now, I assume the name of WiX Bootstrapper Project as MyBundle. I want to install Sample1.msi and Sample2.msi by this project. When I carry out MyBundle.exe, MyBundle is installed other than Sample1 and Sample2. I want to only install Sample1 and Sample2 and I don't want...

Set location of binaries in wixproj file

I am using Wix 3.9 and when I run a continuous integration build in TFS I get an error heat.exe: The directory could not be found because TFS is putting binaries in a different location to my local machine, so the project will build locally but not on TFS. In...