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:

.\windows\1\myinifile.ini

.\windows\2\myiniflile.ini

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   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

1

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.

http://blogs.msdn.com/b/robmen/archive/2005/11/04/deciphering-the-msi-directory-table_2c00_-part-5-_2800_the-dot_2c00_-colon-and-pipe_2900_.aspx

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

Answers

0

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
0

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
0

Create the following two PUBLIC Properties in properties table

INIFILE1=0

INIFILE2=0

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
Answer this question or Comment on this question for clarity