Colin Maharaj wrote:
I need to do this , make changes to System.IniFile.pas
Why do you need to change it?
how can I recompile and make active?
Make a copy of IniFile.pas and add it to your project, then make
whatever modifications you want to the "implementation" section only.
DO NOT modify the "interface" section at all.
Note that this technique only works if you are compiling with Runtime
Packages disabled. Otherwise, you have to recompile the entire RTL.
can I inherit and modify the function.....
procedure TMemIniFile.UpdateFile;
Yes, since UpdateFile() is virtual.
I am having an issue where if the target folder is not Everyone all
access or the app is not run as admin, the write fails.
Makes sense, since TMemIniFile does not save changes to file in
real-time, like TIniFile does. They are only saved when UpdateFile()
is called.
Remember I want to run my apps as non-admin.
Obviously, you are trying to save your INI in a folder that non-admins
do not have write access to. This is a bug in your code, not in
TMemIniFile itself. Microsoft has sets asside specific folders for
this exact situation. You should be using them, not avoiding them.
--
Remy Lebeau (TeamB)
Connect with Us