directory,wix,windows-installer , Error allocating file install folder in WIX 3.9

Error allocating file install folder in WIX 3.9


Tag: directory,wix,windows-installer

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="">
  <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 [ProductName] is already installed." />
    <MediaTemplate EmbedCab="yes"/>

    <Feature Id="ProductFeature" Title="Wix_setup" Level="1">
      <!--create a seperate ComponentGroupRef and Fragment for each extra added program-->
      <ComponentGroupRef Id="InstallationFiles" />
      <ComponentGroupRef Id="DLLs" />
      <ComponentGroupRef Id="IniFiles" />
      <ComponentGroupRef Id="Scripts" />
      <ComponentGroupRef Id="TeamViewer" />
      <ComponentGroupRef Id="Wix_database" />

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="INSTALLFOLDER" Name="Wix_setup" />
    <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" ></Property>
    <UIRef Id="WixUI_InstallDir"/>


    <ComponentGroup Id="DLLs" Directory="INSTALLFOLDER">

      <Component Id="cmp0F2CCC19DBBB1A659BB614D21AAFB413" Guid="{1B34DA48-A891-4923-8437-8116FB986A4E}">
        <File Id="filFD63715191DEBF4B34A2836B7D53C62B" KeyPath="yes" Source="C:\Users\fjansen\Documents\MMI installatie bestanden\MMI install files\Program Files\ActiveX Control Pad\ScrWiz.dll" />


      <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder" />


What I am trying to do in this example is placing a file in the program files folder. But when I build the solution it throws the following errors:

Error   3   Duplicate symbol 'Directory:ProgramFilesFolder' found. This typically means that an Id is duplicated. Check to make sure all your identifiers of a given type (File, Component, Feature) are unique.

Error   1   Duplicate symbol 'Directory:TARGETDIR' found. This typically means that an Id is duplicated. Check to make sure all your identifiers of a given type (File, Component, Feature) are unique.

I don't understand why I get these errors. I need to define multiple pads to multiple locations and some parts of those pads are the same as other ones, which means that, for example, I need to use ProgramFilesFolder multiple times for different files. But now I get an error when I do that.

What am I doing wrong?


This structure should help you. Reference the id of CommonFilesFolder

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="INSTALLFOLDER" Name="Wix_setup" />
        <Directory Id="CommonFilesFolder" />            

this link might help you in future


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?...

PHP Delete a file into a folder

I'm trying to delete specific file name into a folder depend of the action of the user and I receive this warning: Warning: unlink(): http does not allow unlinking in This is the code that have the button that provide the navigation to the deleteRecord.php > <script> //btn delete >...

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

I installed WIX in my machine. I followed the video of 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....

Search a string without . character

I'm stuck with a search file problem. I have a file say: 1346670589521421983450911196954093762922.nii that is referenced to the file below: The difference is that there are (.) placed in different positions. Does anybody know how to search for a file without the fullstop(.)? As i have to go through...

Single Package Authoring

I am trying to create Single Package Authoring installation using following tutorial - Main wix file is following: <?xml version='1.0' encoding='windows-1252'?> <Wix xmlns=''> <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.'...

Copy file into multiple directories - Unix

I want to copy one file into many directory. My path structure is like above. folder1-> anotherfolder -> **here I want to copy my file** folder2-> anotherfolder -> **here I want to copy my file** folder3-> anotherfolder -> **here I want to copy my file** folder4-> anotherfolder -> **here I...

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?

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...

Iterate through a specific directory tree and store all the .ttf files into an array in PHP

Lets say I have a lot of files, some of those are in these paths: root/fonts/folder1/font1.ttf root/fonts/folder1/font2.ttf root/fonts/folder2/font1.ttf root/fonts/folder2/font2.ttf root/scripts/file.php Remember that there are also other types of files in those folders. How can my "/scripts/file.php" iterate through the "../fonts/" directory tree and store all the TrueType font (.ttf) files...

'find' (command) finds nothing with -wholename

Why does this command work: /home/user1/tmp $ find ./../.. -wholename '.*/tmp/file.c' -exec echo '{}' \; ./../../user2/tmp/file.c /home/user1/tmp $ And this command does not work? (finds nothing) /home/user1/tmp $ find /home -wholename '.*/tmp/file.c' -exec echo '{}' \; /home/user1/tmp $ ...

How to automatically delete file older than 24 hours of a .pdf format in a specific folder with PHP

I keep getting many pdf file in my directory root/files/pdfs. I want a PHP script to automatically delete only the .pdf files from the pdfs folder that are older than 24 hours (86400 seconds). What permissions will the .php file require? Where to put the file? Should I have to...

Get number of files in various subdirectories relative to the current page - ColdFusion

I have some cf code which is almost working I think. I have the following structure: work --still-life --portraits --personal In each of these folders there is the same structure: still-life --img-s --img-m --img-l I want to know how many files are in the first directory (img-s) for each of...

Python 3 filtering directories by name that matches specific pattern

Currently I'm developing script that will perform cleanup of specific directories. For example: Directory: /app/test/log contains many sub-directories with name pattern testYYYYMMDD and logYYYYMMDD What I need, is to filter out only directories like testYYYYMMDD To get all folders with absolute path that are in given directory I use: folders_in_given_folder...

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...

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 do I copy a file thant contains random filename

How do I copy files in a directory with filename contains.. see sample below where XXXXXX is a random numbers.. I want to copy from server to same file name to my local folder the code is working operational if I set the filename exactly the same in...

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 =...

Git: Remove directory with quotes and backslashes from repo

I have a directory in my git repository (but not on my local system) named "my\\directory-name" It contains two quotation marks and two backslashes. The problem is that with this directory in my repo it is not possible to checkout the contents completely because (error message:) git doesn't find a...

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)" />...

When moving a views to a new directory, what changes must I make for them to work

To be specific I simply created a subdirectory in the one they were currently contained in and I am now getting Missing template users/index, application/index with {:locale=>[:en].... I assume I need to make a simple change elsewhere so rails knows where to find the views however I have not been...

C# Copy file or folder

I am trying to write a program to keep multiple folders in sync. To do this, I need to copy and delete files and subfolders. To me, it doesn't make a difference if an object is a file or a folder, I want to create all necessary parent folders and...

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...

How to get the name of parent directory in Python? [duplicate]

This question already has an answer here: How do I get the parent directory in Python? 12 answers I have a program in python that prints out information about the file system... I need to know to save the name of the parent directory to a variable... For example,...

Create Directory From Brother Directory

My directories have the following Format: Inside the home directory, there are two directories: archive and production. While inside the production directory I want to write a command to make a directory inside the archive directory. Whats the best way to do this? Thanks in advance...

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...

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?...

Enumerating executable files in C

I am trying to enumerate only files with the execute (+x) bit set. My code seems to list all files. It also seems to enumerate directory and the above directory which I do not want. Example: .. . Is there a way to filter '..' and '.' without strstr()?...

How do you get files with extension from folder in Ada95?

I'm trying to create a function that will look for all .dll files in a specified folder, plugins. All of my web searches (Ada Directories) have work perfectly under Ada 2005, but I need a function that will work for Ada 95. It is to my knowledge that Ada 95...

How to create directories and sub directories efficiently and elegently in Python 2.7?

I am trying to create a bunch of directories and sub directories at a specific location in my PC. My process is something like this: Check if there's any directory with the same directory name. Skip if so. If not, create the directory and the pre-defined sub directories under that...

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...

WiX – copy arbitrary files

The folder where my setup.exe is located contains a subfolder CALhaving files named something like – 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...

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...

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=""> <Product> <!-- I omit here features and...

PHP - Find File in Directory By File Name [closed]

I have a directory full of filenames that contain unix timestamps. How would I get about loading them up in PHP so that I can select the one which I needed?...

SharePoint 2013 - Programmatically access the file in directory from the path present in database table

I have a database table with columns like the serial number that is present in the SharePoint list, name of a file and path in which it is stored. That path is a directory path where the file is stored. I need to access that path and then get the...

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....

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...

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=""> <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...

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...

Media files end up in in a pycharm subdirectory when uploading

I am building a Django application on a Windows system where the user should be able to upload images. But somehow my uploades files end up in my Program Files directory at: C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.5.1\jre\jre\bin\WebApp\media\TestData\static\images I just can't understand why I get this result. I would like...

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...

Generate TCPDF output to a shared drive folder

I'm trying to save my PDF file to a "Shared Folder", I'm using a configuration file to set the "Shared Folder" and then I just set the path inside the PHP file. However it doesn't allow me to save with a "Shared Folder" path, it gives me the error: Failed...

Creating files from a list of csv in a directory

I have the folder "TEST AIS Florent/test division/division2014/testexport/testloop" with 4 csv files in it: testexport_1; testexport_2; testexport_3 and testexport_4. I would like to filter each file and export them to different csv: one for testexport_1, a second one for testexport_2, etc. For now, my script is rm(list = ls()) setwd("D:/TEST...

Ruby on Windows XP: How to change directory of SSL certificates

I installed Ruby 2.0.0 on Windows XP, and run this script: # testSSL.rb require 'open-uri' open('') I get a "certificate verify failed" error on http.rb line 921. Testing further, it seems that Ruby looks for the SSL certificates files here: C:/Users/Justin/Projects/knap-build/var/knapsack/software/x86-windows/openssl/1.0.1l/ssl How can I tell Ruby to look for these...

How do i go to parent directory when using __dirname?

Directory structure : WebApiRole GulpFile.js test Karma.conf.js Gulp code from GulpFile.js gulp.task('test', function (done) { karma.start({ configFile: _configFile: __dirname + '\\..\\test\\karma.conf.js', singleRun: true }, done); }); So my problem going to the parent directory and access the karma.conf.js . For some reason the path is not get resolved with ..\\...

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...

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...

How can I load an image from a local directory in PHP?

My setup (or path) is as follows: |Home |ftpUsername |assets |images.png |script.php | |index.php index.php is located in, which includes script.php in /home/ftpUsername/assets without a problem. script.php is included in index.php using the include() function. My question is, how can I get PHP to load the images (png format)...

How to change a file reader to a directory scanner?

Answer System.out.print("Enter the name of the directory:"); File a= new File((new BufferedReader(new InputStreamReader( .readLine()); File[] b=a.listFiles(); for(int i=1;i < b.length;i++){ fn=b[i].getPath(); } Problem System.out.print("Enter the name of file: "); fn = (new BufferedReader(new InputStreamReader( .readLine(); I have tried File[] file Array=new File(; for(File f: fileArray) // loop through all files...