Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 2

Text file changes not applied all the times

Hi all,

Having an issue here. I configured a Text File Changes replacement set for my Basic MSI Project in InstallShield 2012 Premier, and it doesn't work all the time.

Here's the setup: during the installation of certain features, the file server.ini is put in the [INSTALLDIR] of the customer's computer, alongside some database files (do not it is not a true INI file, so I cannot use the INI file changes).
The server.ini file is to be used in conjuncture with SQL Anywhere 11 as a means of configuration file. There are 5 lines like that: C:\CMEQDB\Cie01.db (that ranges from Cie01.db to Cie05.db).

During the installation, the user will configure the drive letter that the database files and server.ini will be installed. This sets the property [DBDRIVE], which then triggers a custom action that modifies the [INSTALLDIR] to reflect the new changes (by default, [DBDRIVE] is set to C:\).

I have configured the Text File replacement set to search for C:\CMEQDB and replace it with [INSTALLDIR] doesn't work.
I have tried a few things, none seemed to work.

The only way I can have it working (partially) is this:
Changed the C:\ to %DBDRIVE% in the server.ini file (thus giving me %DBDRIVE%CMEQDB\Cie01.db)
Replacement set searches for %DBDRIVE% in [INSTALLDIR] *.ini and replaces it with [DBDRIVE]
The problem here is that it doesn't seem to adjust to the new [DBDRIVE] value...If I leave [DBDRIVE] as C:\, the replacement is working. If I change it to anything else, it doesn't work.

Could someone help me here ? Kinda lost really....
Labels (1)
0 Kudos
(2) Replies
Level 17

A verbose log may help you troubleshoot the issue. KB article Q106551 explains how to create the log.
0 Kudos
Level 2

Hi hidenori, thanks for the answer.

I had already done a Verbose log file, which didn't help much BUT it seemed like for some reason, the File Text changes were being applied BEFORE the files were copied.

I opened up ProcessMonitor while doing the installation, and indeed, InstallShield tries to change the content of my file BEFORE actually installing said file in my computer....which is odd to be honest!

I attached a copy of the MSI Log file, if that might help. If my assessment is correct, I still don't get why it works when I leave the DBDRIVE property to it's default value of C:\, but not when I change it.

I tried on a few different computers with different user accounts, to make sure it wasn't a user rights thing, and it still doesn't work.
0 Kudos