cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
karthic
Level 4

file replace - how to identify

😉 hi,
I am creating Basic MSI projects. I understand that during upgrade installation all the files older version of files are replaced with new one. I have a set of .ini and .dat files that holds the user customized data.

Assume 1.0 version of ini file has 2 key value pairs. and the default value are set as below
1.0 x.ini
======
Type="guestuser" ; Reset="true" ;
After installation user modifies the values for Type="Admin" and Reset="Auto"

2.0 version of the same file has added 3 key value pairs(1 newly added). with the(default value as mentioned )
x.ini
======
Type="guestuser" ; Reset="true" ; Rights="Elevated"

After i install the ini file the expected output is
Type="Admin" ; Reset="Auto" ; Rights="Elevated"

Is there anyother way to achieve this without manually handling it in custom action. If any one has any suggestion plz post the reply.

thank you in advance
Labels (1)
0 Kudos

(1) Reply
MichaelU
Level 12 Flexeran
Level 12 Flexeran

If you want to support arbitrary user modifications to these, you'll need to make sure the Data Values you write reference (public - ALL_CAPS) properties. Then use a custom action or other means to probe the current values from the file to override the default value for those properties.

For example, one of the keywords might look like:
[CODE]Type (Keyword):
Display Name: {ID_STRING3} Type
Action: Replace Old Value
Data Value: [MY_TYPE][/CODE]
0 Kudos