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

Double backslash in .ini file - how?


1 reply to this topic

jdannenb

jdannenb
  • Members
  • 4 posts

Posted 09 October 2002 - 15:39

Hi,
my component contains a .ini-file.
I have a key, which I change depending on [INSTALLDIR]
Example:
[cfgdata]
mykey=[INSTALLDIR]
...

After installation, the key is changed to:
[cfgdata]
mykey=C:\whatever\subdir
...

Problem: This ini-file is read as a java.property by a standard application which i cannot redesign. I need doublebackslashes like c:\\whatever\\subdir so the java-app can read this keyvalue.

Any ideas???
Tnx in advance!
Greets
Jens

vkj

vkj
  • Members
  • 15 posts

Posted 10 October 2002 - 12:09

You can do this by using an install script custom action (for file edit) after copying the ini file.

Copy the INSTALLDIR string and replace the slashes with double slashes. In install script string you will have to give "\\\\" for "\\". After this, use the FileDeleteLine and FileInsertLine functions to replace the line.

- vkj