/build/static/layout/Breadcrumb_cap_w.png

Windows Installer conditions

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

Answers (4)

Posted by: dandirk 11 years ago
Third Degree Green Belt
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.

Posted by: Secondlaw 11 years ago
Third Degree Blue Belt
0

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

Posted by: henrik80 11 years ago
Second Degree Blue Belt
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. 

Posted by: jagadeish 11 years ago
Red Belt
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..

 


Comments:
  • Have tried this method with public properties as I mentioned in the above post - jagadeish 11 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ