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: Replace line in iss 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
‎Sep 25, 2008
06:45 AM
Replace line in iss file
Hi,
I have created a silent installation file for a third party application that I launch via our installation.
The szDir is hardcoded and points to C:\Program Files\...
I need to be able to modify that line according to whatever drive the user wants to install the program to.
So, the question is:
how can I replace a line (specifically the szDir= line...) in an .iss file?
I'm thinking bat script or similar, but if anyone has a better suggestion that's nice. I know the line in the .iss file but need to change the value to the current %programfiles% value.
Regards,
Linda
I have created a silent installation file for a third party application that I launch via our installation.
The szDir is hardcoded and points to C:\Program Files\...
I need to be able to modify that line according to whatever drive the user wants to install the program to.
So, the question is:
how can I replace a line (specifically the szDir= line...) in an .iss file?
I'm thinking bat script or similar, but if anyone has a better suggestion that's nice. I know the line in the .iss file but need to change the value to the current %programfiles% value.
Regards,
Linda
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 25, 2008
07:46 AM
You could build your path in the custom action by using a public property in your IS script.
If you send me the code behind your custom action I could show you how to.
If you send me the code behind your custom action I could show you how to.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 25, 2008
10:24 AM
Thanks,
I just got a solution to the problem. I'll use a custom action where I run a bat script that echoes all lines to an .iss file.
Run e.g. file.bat > file.iss
Example content of file:
@echo off
echo [First line]
echo Second line
echo szDir=%PROGRAMFILES%\Company name
/Linda
I just got a solution to the problem. I'll use a custom action where I run a bat script that echoes all lines to an .iss file.
Run e.g. file.bat > file.iss
Example content of file:
@echo off
echo [First line]
echo Second line
echo szDir=%PROGRAMFILES%\Company name
/Linda
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 11, 2009
06:00 PM
Sorry to drag this old topic back up, but I was wondering if anyone else has any ideas for other solutions to this problem. I don't want to make an extra script to edit the contents of the .iss file but referring to the environment variable directly in the .iss file doesn't seem to work. Any help would be appreciated, thanks!