hi everyone,

I need help understanding how to put an INI file into Wise for Windows Installer and set it depending on the bitness of a computer.

in the INI file, I wish to have the folder redirected to c:\program files or c:\program files (x86) depending on the bitness. I did a search but I can't recall how to set the INI file for this.

I thought it was like this:

[ProgramFilesFolder]Microsoft\Office=True  (only an example, not the real folder)

thank you!


Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answer Chosen by the Author

0

I'd use INSTALLDIR instead, as your users might choose to install in a completely different folder, making your carefully crafted 'ProgramFiles' hack pointless! :-)

Thus in the INI table, your entries will look something like the below. Remember that directory properties are resolved to include the trailing backslash:

Key:
[INSTALLDIR]Prompt_Products_V12.rpt
Value:
6930||7260||GroupTree::106||75
Answered 03/08/2016 by: VBScab
Red Belt

  • our installations are all silent, a user cannot change the install folder.

    I'll give this a try though.

    thanks!
Please log in to comment

Answers

0
Hi, you have to be a bit more specific... is the MSI 32bit?
If so, it should not make a difference, as the engine will get the Program Files (on a 32bit system) and Program Files (x86) on a 64bit system...

Or do you need to use Program Files on 64bit systems from a 32bit MSI?

Phil
Answered 03/07/2016 by: Pressanykey
Red Belt

Please log in to comment
0

use the INI file table.
set the directory to ProgramFilesFolder.  That will resolve to the appropriate folder no matter what OS its running on.

Answered 03/07/2016 by: Badger
Red Belt

  • Badger, that is what I wish to do, but I do not know the correct syntax.

    [ProgramFilesFolder]MySubFolder...

    is that it?

    BTW, I said I need this INSIDE the INI file, not the location of the file.

    as an example, here's a section that I need to modify;

    [Parameter_Windows]
    [ProgramFilesFolder]Millet Software\Datalink Viewer 2011\Prompt_Products_V12.rpt= 6930||7260||GroupTree::106||75
    [ProgramFilesFolder]Millet Software\Datalink Viewer 2011\Prompt_Product_Types_V12.rpt= 8235||4425||None::200||100
    [ProgramFilesFolder]Millet Software\Datalink Viewer 2011\Prompt_Order_Year_V12.rpt= 4665||4050||None::200||100

    thanks!
    • that's easy... what tool are you using??
Please log in to comment
0

I have done a quick mock up for a hypothetical INI file. I think you just need to figure out what bit in the INI file correlates to which part on the INI file table.

Here is the boring version...

IniFile table Columns


IniFile
The key for this table.
FileName
The localizable name of the .ini file in which to write the information.
DirProperty
Name of a property having a value that resolves to the full path of the folder containing the .ini file. The property can be the name of a directory in the Directory table, a property set by the AppSearch table, or any other property that represents a full path. If this field is left blank, the .ini file is created in the folder having the full path specified by the WindowsFolder property.
Section
The localizable .ini file section.
Key
The localizable .ini file key within the section.
Value
The localizable value to be written.
Action
The type of modification to be made. Constant Hexadecimal Decimal Modification
    msidbIniFileActionAddLine 0x000 0 Creates or updates a .ini entry.
    msidbIniFileActionCreateLine 0x001 1 Creates a .ini entry only if the entry does not already exist.
    msidbIniFileActionAddTag 0x003 3 Creates a new entry or appends a new comma-separated value to an existing entry.

Component_
External key into the first column of the Component table referencing the component that controls the installation of the .ini value.

Here's the slightly prettier version: 

The ini file i have made above looks like this in the MSI...

 

Pay a LOT OF ATTENTION to the value of the Action.
read the above to see what happens...

FYI, in the above image I have used '1' as the action, only create the entry if it does NOT exist.

Hope that makes sense.

Answered 03/08/2016 by: Badger
Red Belt

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