Edit ini file during update

Got a problem you cannot solve? Try here.
Post Reply
Raubi
Posts: 14
Joined: Wed Jan 06, 2010 10:09 am
Location: Germany
Contact:

Edit ini file during update

Post by Raubi »

Hi,

is it possible to update an ini file during an update?

I use the normal updates.mia which is provided by IA. Just did a few changes.

With this code I want to update the ini:

Code: Select all

[DEFINE REGION: Download and Install Updates]
label: Check for Updates
Set Variable UPDATE_GET_INI to 
Download File #UPDATE_SERVER# into $SUPPORTDIR$\updates.ini (get result into variable UPDATE_GET_INI)
Edit INI File $MYAPPDATA$\SoftwareName\Ro.ini, [Update] LastUpdateCheck=$DATE$
Apply Install
If I try it this way, I get the message:

Code: Select all

---------------------------
SoftwareName
---------------------------
Error

The given path $MYAPPDATA$\SoftwareName is not available.
---------------------------
OK   
---------------------------

I want to update the ini file even if the user decided not to install new updates.

Is it possible within built in functions or do I have to write a plugin for it?

Thanks for help
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Edit ini file during update

Post by mills »

What is $MYAPPDATA$ pointing to?
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Raubi
Posts: 14
Joined: Wed Jan 06, 2010 10:09 am
Location: Germany
Contact:

Re: Edit ini file during update

Post by Raubi »

Hi,

i found the problem. MYAPPDATA was not defined in updater context. But with the "Apply Install" the installer does more than just updating the ini file. So I wrote a little plugin doing the job.
Post Reply