/build/static/layout/Breadcrumb_cap_w.png

program files folder in an INI file in WfWI

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!



0 Comments   [ + ] Show comments

Answers (4)

Answer Summary:
Posted by: Pressanykey 8 years ago
Red Belt
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
Posted by: Badger 8 years ago
Red Belt
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.


Comments:
  • 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! - kardock 8 years ago
    • that's easy... what tool are you using?? - Badger 8 years ago
Posted by: Badger 8 years ago
Red Belt
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.

Posted by: anonymous_9363 8 years ago
Red Belt
0

Top Answer

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

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

    I'll give this a try though.

    thanks! - kardock 8 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