I'm having a small issue here.

I've set up two conditional components.  The command line will determine which .ini file is installed to C:\winnt\myinifile.  So I've setup two folders in my wisesourcepath:



When I install the software with a commandline of, "inifile1", it's failing because it can't find ".\windows\inifile.ini (this wont exist because I'm not pulling the file from "windows\inifile.ini".

If the commandline contains inifile1 then it should pull the ini file from .\windows\1\myinifile and install to C:\winnt\myinifile.ini

If the commandline contains inifile2 then it should pull the ini file from .\windows\2\myinifile and install to c:\winnt\myinifile.ini.

I've done this before but it's not working now. 

Component 1 is "myinifile1" with a condition of, "inifile="inifile1""

Component 2 is "myinifile2" with a condition of, "inifile="inifile2""

I'm going nuts.  The contents of the 2 inifiles are different and need to be installed pending the commandline.

0 Comments   [ - ] Hide Comments


Please log in to comment

Community Chosen Answer



Essentially what you are trying to do is setup 2 files with the same name, installed fromdifferent Source directories.  Most commonly used for drivers where you see x86 and x64 folders...

Most of this has to do with the directory table entries...  Here is a site that greatly helped when I had to do something similar.


That being said... there could be an easier way.  Since the files are INI, you can create your conditioned ini edits using that method instead.  No issues with file sources, cause there isn't any.

Another way to do something similar would be to install both INI files to your INSTALLDIR, in different folders obviously...  Then use conditioned components and the duplicatefiles table to copy one or the other to the proper location.

Answered 06/13/2012 by: dandirk
Third Degree Green Belt

Please log in to comment
Answer this question or Comment on this question for clarity



This is pretty much what I'm doing.  The problem is a windows installer 1308 error.  This is driving me nuts.

Answered 06/14/2012 by: Secondlaw
Third Degree Blue Belt

Please log in to comment

If you are using the Properties inifile1 & inifile2 as public properties the properties must use capital letters to pass it from the command line. 

Answered 06/15/2012 by: henrik80
Second Degree Blue Belt

Please log in to comment

Create the following two PUBLIC Properties in properties table



Keep your myinifile.ini (from .\windows\1\myinifile) in inifile1 component, keep INIFILE1=1 as component condition

and then

Keep your myinifile.ini (from .\windows\2\myinifile) in inifile2 component, keep INIFILE2=1 as component condition

now, if you pass INIFILE1=1 in command line then myinifile.ini from (from .\windows\1\myinifile) will be installed

if you pass INIFILE2=1 in command line then myinifile.ini from (from .\windows\2\myinifile) will be installed

If you dont pass any of these property then both will not be installed as they have 0 in property value..


Answered 06/14/2012 by: jagadeish
Red Belt

  • Have tried this method with public properties as I mentioned in the above post
Please log in to comment