This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Text File Replace and a Read Only File...
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Apr 07, 2016
08:32 PM
Text File Replace and a Read Only File...
Hi all,
I think I have a decent solution to this problem, but I just wanted to be sure there wasn't some slick way to work around my problem in the .msi tables. We have an .xml file that needs to be edited with a directory created during the install. However, the file also has to be marked as Read Only.
I figured that ISSearchReplaceInstall runs after the file is installed. I also figured that if I mark the file in the component in question to be set as Read Only the text replacements will have no effect. I tested with my install and that appears to be the case. I believe working this out in the .msi tables themselves is impossible.
What I did was simply installed the file without the Read Only attribute and let the Text Replacements do their job. I then run a custom action .exe stored in the binary table which sets the file to Read Only.
It seems to work OK, but I'm just wondering if there is a more elegant solution.
Any feedback appreciated!
Thanks in Advance!!
I think I have a decent solution to this problem, but I just wanted to be sure there wasn't some slick way to work around my problem in the .msi tables. We have an .xml file that needs to be edited with a directory created during the install. However, the file also has to be marked as Read Only.
I figured that ISSearchReplaceInstall runs after the file is installed. I also figured that if I mark the file in the component in question to be set as Read Only the text replacements will have no effect. I tested with my install and that appears to be the case. I believe working this out in the .msi tables themselves is impossible.
What I did was simply installed the file without the Read Only attribute and let the Text Replacements do their job. I then run a custom action .exe stored in the binary table which sets the file to Read Only.
It seems to work OK, but I'm just wondering if there is a more elegant solution.
Any feedback appreciated!
Thanks in Advance!!
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Apr 18, 2016
09:01 AM
Superfreak,
Do you have the option of writing an InstallScript function instead of requiring an external binary?
http://helpnet.flexerasoftware.com/installshield21helplib/Subsystems/installshield21langref/installshield21langref.htm#CSHID=helplibrary%2FLangrefSetFileInfo.htm|StartTopic=helplibrary%2FLangrefSetFileInfo.htm
HTH
Do you have the option of writing an InstallScript function instead of requiring an external binary?
http://helpnet.flexerasoftware.com/installshield21helplib/Subsystems/installshield21langref/installshield21langref.htm#CSHID=helplibrary%2FLangrefSetFileInfo.htm|StartTopic=helplibrary%2FLangrefSetFileInfo.htm
HTH