Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Text file changes not applied all the times


9 replies to this topic

AlexPilon

AlexPilon
  • Full Members
  • 17 posts

Posted 02 March 2015 - 17:32

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]....it doesn't work.

I have tried a few things, none seemed to work.

 

The only way I can have it working (partially) is this:

  1. Changed the C:\ to %DBDRIVE% in the server.ini file (thus giving me %DBDRIVE%CMEQDB\Cie01.db)
  2. 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....



AlexPilon

AlexPilon
  • Full Members
  • 17 posts

Posted 02 March 2015 - 21:29

If it might help, I got a log file of the installation attached to this reply....I looked through it and I see no error whatsoever during the IsReplace actions.



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 03 March 2015 - 13:08

I don't see the log, please zip it if it's too big.

Double check to see if the DBDRIVE property has the correct value at the time the replacement takes place.



AlexPilon

AlexPilon
  • Full Members
  • 17 posts

Posted 03 March 2015 - 14:29

Ha, I forgot to click "Attach this file". There's the log file. 

 

And I looked through it: 

MSI (s) (38:A0) [15:24:49:982]: PROPERTY CHANGE: Modifying DBDRIVE property. Its current value is 'C:\'. Its new value: 'G:\'.InstallShield 15:24:51: Beginning ISSearchReplaceSet Costing Process...
InstallShield 15:24:51: Reading the data from ISSearchReplaceSet table...
InstallShield 15:24:51: Finished ISSearchReplaceSet Costing Process...
InstallShield 15:24:51: Setting Costing Info Location  ISSearchReplaceInstall : C:\Users\ADMINI~1.CME\AppData\Local\Temp\~E2A6.tmp
MSI (s) (38!08) [15:24:51:090]: PROPERTY CHANGE: Adding ISSearchReplaceInstall property. Its value is 'C:\Users\ADMINI~1.CME\AppData\Local\Temp\~E2A6.tmp'.
InstallShield 15:24:51: Setting Costing Info Location  ISSearchReplaceUninstall : C:\Users\ADMINI~1.CME\AppData\Local\Temp\~E2A6.tmp
MSI (s) (38!08) [15:24:51:091]: PROPERTY CHANGE: Adding ISSearchReplaceUninstall property. Its value is 'C:\Users\ADMINI~1.CME\AppData\Local\Temp\~E2A6.tmp'.
InstallShield 15:24:51: Setting Costing Info Location  ISSearchReplaceFinalize : C:\Users\ADMINI~1.CME\AppData\Local\Temp\~E2A6.tmp
MSI (s) (38!08) [15:24:51:091]: PROPERTY CHANGE: Adding ISSearchReplaceFinalize property. Its value is 'C:\Users\ADMINI~1.CME\AppData\Local\Temp\~E2A6.tmp'.
InstallShield 15:24:51: Setting Costing Info Location  ISSearchReplaceRollback : C:\Users\ADMINI~1.CME\AppData\Local\Temp\~E2A6.tmp
MSI (s) (38!08) [15:24:51:092]: PROPERTY CHANGE: Adding ISSearchReplaceRollback property. Its value is 'C:\Users\ADMINI~1.CME\AppData\Local\Temp\~E2A6.tmp'.
MSI (s) (38:A0) [15:24:51:717]: Executing op: FileCopy(SourceName=Server.ini,SourceCabKey=server.ini1,DestName=Server.ini,Attributes=16384,FileSize=181,PerTick=65536,,VerifyMedia=1,,,,,CheckCRC=0,,,InstallMode=58982400,HashOptions=0,HashPart1=2108083365,HashPart2=71362658,HashPart3=1309394516,HashPart4=-942264867,,)
MSI (s) (38:A0) [15:24:51:723]: File: G:\CMEQDB\Server.ini; Won't Overwrite; Won't patch; Existing file is unversioned and unmodified - hash matches source file
// [The next line happens between 15:24:51:798 and 15:24:51:806...the milliseconds part of the log isn't there for some reason]
InstallShield 15:24:51: Processing the replacement set 'DB_CONFIG'; Target Folder: G:\CMEQDB\, Include Files: *.ini, Exclude Files: , Include Subfolders: Yes, Look in Unicode Files: Yes, Look in ANSI Files: Yes

So a bit more than a second after the DBDRIVE property is changed to G:\, the ISSearchReplace actions are happening. 

 

In theory, unless I'm mising something, DBDRIVE property is changed, temp files for the Replacement Set are created, the actual untouched file is being created where's it's supposed to be, and then the replacement set is being applied exactly where it's supposed to.... *insert depressed face here*

Attached Files

  • Attached File  TEST.txt   364.67KB   137 downloads

Edited by AlexPilon, 03 March 2015 - 14:30.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 03 March 2015 - 18:20

Please could you also post the settimgs of your text replacement entry in InstallShield?

In the log I noticed that Server.ini is not being installed because it already exists. I wonder if that might be related.



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 03 March 2015 - 18:21

An for testing purposes, have you tried G: without the trailing backslash? Just to make sure we not running into any special character issues.



AlexPilon

AlexPilon
  • Full Members
  • 17 posts

Posted 03 March 2015 - 18:58

Hi Stefan,

 

Thanks for the help really. That's the last step for my package to be working, everything else is working great!

 

The Log I provided was indeed done while the file was already in place. In my many tries, I have done testing with and without the file being present. The outcome was always the same.

 

As for your last request, I can't modify how the property applies without having to resort to a custom action. The Control that modifies the event is a VolumeSelectCombo control, and by default, it adds the trailing backslash...

 

I attached to my post 5 screenshots.

 

The first is the current setup design. 

The second if the Replacement Set configuration. It is attached to the component "server.ini_CONFIG", which is linked to the main "Serveur" feature.

The third is the Replacement configuration.

The fourth is the original Server.ini file that is copied on the end user's computer.

The fifth is what the modified Server.ini file looks like (and should look like) once the modification is done. This was not done manually, but rather by InstallShield.

 

As previously mentioned, for some reason, when I leave the VolumeSelectCombo control to its default value of C:\, it works.

 

I don't know the exact order of the Execute actions being applied in the back, but for another feature, some Registry entries have to be adjusted to, again, reflect the [DBDRIVE] property, and this works without a hitch. These entries are created by the installation package are are not present on the end user's computer, but even if they are installed, it still works (did the test). Just thought I'd drop the info here.

 

I could supply ProcessMonitor information if you want. Tried to, but the XML generated version is too big, and the CSV files are not let through on the forum ("Error You aren't permitted to upload this kind of file")

Attached Images

  • 1-Setup_Design.png
  • 2-Replacement_Set.png
  • 3-Replacement.png
  • 4-Server.ini_Original.png
  • 5-Server.ini_Modified.png


AlexPilon

AlexPilon
  • Full Members
  • 17 posts

Posted 03 March 2015 - 22:03

I have some extra information here!

 

After doing a (not so dumb after all) test of setting the default [DBDRIVE] value to G:\ instead of C:\, I noticed that it wouldn't change to G:\. 

Apparently, it is not a configuration problem but something to do with a network drive? Is this at all possible ?

 

I have multiple network drives, that are located on a Synology NAS, and the user account I'm using has total and complete control over the shared folder (using a domain admin account for the testing on a VM).

Just for the fun of it, to make sure it wasn't a rights thing, I did it on a fixed computer that I had hooked a USB external HDD, configured on B:\. 

Ran the installation package, chose B:\ as the [DBDRIVE]'s new property value, and it did the exact same thing as it did if I chose G:\. If I switch from the default value of G:\ to C:\, it works and does the change...

 

I don't know if this'll help, but it seemed important to mention!....and it's also pretty weird.



AlexPilon

AlexPilon
  • Full Members
  • 17 posts

Posted 04 March 2015 - 21:35

Hi, me again, with some more extra information.

 

I tried to have InstallShield create a real .ini file instead of modifying the "fake" one I was supplying: That worked well. The creating and everything works well, whether it's on a fixed drive or on a network drive. 

 

Then, to remove the "=" from the ini file, I created a text replacement that would search for "=" and replace it....again, if it's installed on C:\ it works, but on a network drive it doesn't work.

 

Just to make sure, I tried it on a computer that had two fixed drives installed and a few mapped drives: It work on both the fixed drives, but didn't want to work on the fixed drives.

 

Is there a known bug with Text File Changes when said file is situated on a network drive ??

 

Just to prove it once and for all, I created an extra Replacement Set to find a file on the network drive O:\, and ask to replace something within it, while the other previously mentioned replacements were going to be done on the local C:\ drive: The changes on the C:\ drive were done, but nothing was done on the file located on the network drive.

 

I'm really at a loss here....



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 15 March 2015 - 17:29

That's really weird and I have no idea why this isn't working as intended. Maybe contact Flexera to see if it's a problem in their code?