Page 1 of 1

Patch a post install modified file

Posted: Sat Jul 28, 2012 1:25 pm
by DarExc
Hello,

I have been testing various patching functions with much success. However, one problem I am having is an ini file we use. It is installed with default values but is modified according to what the user selects in the install, regardless of what they select though, the file will not be the same as the original created at the start of the install. My problem is when I try to patch this file, either with a new file of the same name (which I'll never do) or using the edit ini file command in the script the changes aren't made in the patch. I am assuming this is because the original file isn't the same as the install source. My question is, is it possible to update a line in the ini file with a patch regardless of what it currently looks like or was modified post install?

Thanks

Re: Patch a post install modified file

Posted: Sun Jul 29, 2012 11:23 pm
by Feyh
Hello,

just tried it and it works fine for me.
You have to set the variable "NATIVE_ENGINE" to true before running the "Edit Ini File"-command. Right after u can reset it to false.

Code: Select all

~InstallAware Clipboard Data~
~Set Variable~
~{2CE54042-4872-4D9F-9D3B-D4C006DAA358}~
~NATIVE_ENGINE$MYAH$MYAH$FALSE~
~FALSE~
~Edit INI File~
~{DC57FCAE-B10A-484D-AA50-CD58E367F841}~
~$DESKTOPDIR$~
~test.ini~
~0~
~Test~
~Value~
~1337~
~Set Variable~
~{C5D7EAFB-EB09-4B06-9B3E-6D79DD6B2F25}~
~NATIVE_ENGINE$MYAH$MYAH$FALSE~
~TRUE~
Hope this helps.

Greetings

Re: Patch a post install modified file

Posted: Mon Jul 30, 2012 5:02 am
by FrancescoT
Dear DarExc,

doing as Feyh suggested just after Apply Install or Apply Patch, it should work fine.

Regards.

Re: Patch a post install modified file

Posted: Fri Aug 03, 2012 11:42 am
by DarExc
Thanks a lot, problem solved :)

Re: Patch a post install modified file

Posted: Fri Aug 03, 2012 12:33 pm
by FrancescoT
:D :D :D