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


Error allocating file install folder in WIX 3.9

Question:

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="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="*" Name="Wix_setup" Language="1033" Version="1.0.0.0" 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" />
    </Feature>
  </Product>

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

  <Fragment>

    <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" />
      </Component>

    </ComponentGroup>

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

  </Fragment>

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?


Answer:

This structure should help you. Reference the id of CommonFilesFolder

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

this link might help you in future

https://msdn.microsoft.com/en-us/library/s2esdf4x%28VS.80%29.aspx


Related:


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


ruby,ssl,directory,certificate
I installed Ruby 2.0.0 on Windows XP, and run this script: # testSSL.rb require 'open-uri' open('https://www.google.com') 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...

Copy file into multiple directories - Unix


linux,bash,unix,directory,directory-structure
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...

Enumerating executable files in C


c,unix,directory,ansi
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: .. should_not_be_executable.sh . Is there a way to filter '..' and '.' without strstr()?...

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


python,variables,directory
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,...

Error allocating file install folder in WIX 3.9


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="http://schemas.microsoft.com/wix/2006/wi"> <Product Id="*" Name="Wix_setup" Language="1033" Version="1.0.0.0" Manufacturer="Frank Jansen" UpgradeCode="37a42e55-dea8-47da-8f4f-fb065dd38a9e"> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" /> <MajorUpgrade DowngradeErrorMessage="A newer version of...

WiX – copy arbitrary files


c#,wix
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...

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


database,directory,sharepoint-2013
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...

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


wix,wix3.9
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...

command line Start.Info.Argument error


c#,command-line,wix,heat
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...

WiX error build target


msbuild,wix,installer
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)" />...

Generate TCPDF output to a shared drive folder


php,pdf,path,directory,tcpdf
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...

How to change a file reader to a directory scanner?


java,loops,directory,bufferedreader,inputstreamreader
Answer System.out.print("Enter the name of the directory:"); File a= new File((new BufferedReader(new InputStreamReader(System.in))) .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(System.in))) .readLine(); I have tried File[] file Array=new File(System.in).listFiles(); for(File f: fileArray) // loop through all files...

WIX-Installer ServiceControl “sufficient privileges” error


c#,windows-services,wix,installer,visual-studio-2015
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...

Single Package Authoring


wix,windows-installer
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.'...

Creating a silent installer for a MSI


wix,nsis,msiexec,silent-installer
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...

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


php,image,directory,load
My setup (or path) is as follows: |Home |ftpUsername |assets |images.png |script.php |mydomain.com |index.php index.php is located in mydomain.com, 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)...

Media files end up in in a pycharm subdirectory when uploading


django,upload,directory,settings,media
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...

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


python,python-2.7,directory,directory-structure,python-os
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...

SHFileOperation cannot remove folder


c++,wix
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 =...

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


visual-studio-2012,wix
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....

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


php,loops,iterator,directory,iteration
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...

Git: Remove directory with quotes and backslashes from repo


git,directory,repository,special-characters
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...

Trigger uninstall and Repair of previously installed product


wix,windows-installer,wix3.8
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...

Search a string without . character


c#,linq,search,directory
I'm stuck with a search file problem. I have a file say: 1346670589521421983450911196954093762922.nii that is referenced to the file below: 1.3.46.670589.5.2.14.2198345091.1196954093.762922.dcm 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...

WIX XMLConfig Different Root Element Names


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

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


coldfusion,directory,cfdirectory
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...

Namespace prefix 'bal' is not defined


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

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


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

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


c#,.net,wix
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 automatically delete file older than 24 hours of a .pdf format in a specific folder with PHP


php,delete,directory,file-manipulation
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...

How to define WIX agent requirment in TeamCity?


msbuild,wix,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...

Creating files from a list of csv in a directory


r,csv,directory,filelist
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...

PHP Delete a file into a folder


php,html,directory
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 >...

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


visual-studio-2013,wix
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?...

How to change Install button display text conditionally


wix,windows-installer,wix3.8
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...

Create Directory From Brother Directory


directory,mkdir
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...

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


directory,folder,ada
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 do i go to parent directory when using __dirname?


javascript,node.js,directory,gulp,gulp-karma
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 ..\\...

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


ruby-on-rails,ruby,directory
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...

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


c++,wix,platform
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?

C# Copy file or folder


c#,file,directory,copy,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...

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


c#,vb.net,wix
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


build,wix,nant,wix3.9
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....

'find' (command) finds nothing with -wholename


linux,bash,directory,find
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 $ ...

Python 3 filtering directories by name that matches specific pattern


python,regex,python-3.x,directory,filtering
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 launch executable after installation (exe is delivered by .msm)


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


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

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


wix,windows-installer
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...

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


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