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

Updating an ini file at end of installation


2 replies to this topic

gbyers

gbyers
  • Members
  • 5 posts

Posted 18 October 2001 - 15:30

My first attempt to update my ini file, installed with the product was the WriteINIValues at the end of the UserInterface installation with the change in the 'ini file changes' section, but that returns an error.
The only other option i can see is to use installscript to get the property from the properymanager, and then use writeprofstring to write it to the ini file.

Can anyone give me a hand doing this in installscript??


omwof

omwof
  • Members
  • 13 posts

Posted 18 October 2001 - 16:58

Use the function MsiGetProperty
(hInstall,"MYPROPERTY",szReturnString,nReturnSize),
this is wrapped in the ISMsiQuery.h header file.

If you call this twice the first time it will return the length of the string value of the property.

then

nReturnSize = nReturnSize +1
Resize(szReturnString,nReturnSize)

then call MsiGetProperty  a second time. As nRuturnsize is no longer 0 ( we hope) it will read a string of length nRuturnsize into szReturnString.

THen use your writeProfileString or what have you.

(Edited by omwof at 9:35 am on Oct. 19, 2001)