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
- :
- Set INSTALLDIR from location in an .ini file already on destination machine.
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
Jan 08, 2014
12:30 PM
Set INSTALLDIR from location in an .ini file already on destination machine.
My installer installs a module for an existing piece of software existing on the target machine. I need to read a path from an existing ini file on the target machine to get and set the INSTALLDIR of the module being installed. How? I did some forum searches, but didn't find anything related to my specific need.
Thanks.
Thanks.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 08, 2014
03:16 PM
cthumann wrote:
My installer installs a module for an existing piece of software existing on the target machine. I need to read a path from an existing ini file on the target machine to get and set the INSTALLDIR of the module being installed. How? I did some forum searches, but didn't find anything related to my specific need.
Thanks.
Nevermind, I figured it out myself. Created an InstallScript file that does the following...
function GetPathFromINI(hMSI)
STRING svResult;
begin
GetProfString ( "c:\\Windows\\file.ini" , "File Locations" , "Path" , svResult );
MsiSetProperty(hMSI,"INSTALLDIR",svResult);
// for testing only; make sure the INSTALLDIR gets set from the ini file
//MessageBox("Location from INI: " + INSTALLDIR, INFORMATION);
end;
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)