Software Deployment Question

program files folder in an INI file in WfWI

03/07/2016 839 views

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


Answer Chosen by the Author


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:

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.


All Answers

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?

Answered 03/07/2016 by: Pressanykey
Red Belt


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.


    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;

    [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

    • that's easy... what tool are you using??

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

The key for this table.
The localizable name of the .ini file in which to write the information.
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.
The localizable .ini file section.
The localizable .ini file key within the section.
The localizable value to be written.
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.

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

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