System32 Ini File
Hi Guys,
I'm still seeing a rbuilder.ini file being created in the \System32 folder
with RB 10.09 and the 07/03/2008 patch to ppIniStorage. The call to
TppIniStoragePlugIn.CreateInstance is ultimately calling CreateCustomIniFile
with a file name of '($WINSYS)\RBuilder.ini' which is what FStorageName is
being set to in the initialization section of the unit.
Any possibility that there is a patch available so that it won't attempt to
create the zero byte ini file in the System32 folder?
--
---------------------------------------
Terry Swiers
Millennium Software, LLC
http://www.1000years.com
http://www.atrex.com
Atrex Inventory Control/POS -
Big business features without spending big business bucks!
Atrex Electronic Support Options:
Atrex Knowledgebase: http://www.atrex.com/atrexkb.asp
Email: mailto:support@atrex.com
I'm still seeing a rbuilder.ini file being created in the \System32 folder
with RB 10.09 and the 07/03/2008 patch to ppIniStorage. The call to
TppIniStoragePlugIn.CreateInstance is ultimately calling CreateCustomIniFile
with a file name of '($WINSYS)\RBuilder.ini' which is what FStorageName is
being set to in the initialization section of the unit.
Any possibility that there is a patch available so that it won't attempt to
create the zero byte ini file in the System32 folder?
--
---------------------------------------
Terry Swiers
Millennium Software, LLC
http://www.1000years.com
http://www.atrex.com
Atrex Inventory Control/POS -
Big business features without spending big business bucks!
Atrex Electronic Support Options:
Atrex Knowledgebase: http://www.atrex.com/atrexkb.asp
Email: mailto:support@atrex.com
This discussion has been closed.
Comments
Hmm, I cannot reproduce this in my testing here. Perhaps you are getting
that from the Delphi IDE, which uses the RB packages. The patch will not fix
Delphi design-time.
You are correct that TppIniStoragePlugIn.CreateInstance is calling
CreateCustomIniFile. That method calls Delphi's
TMemIniFile.Create(aStorageName), which calls LoadValues. TMemIni.LoadValues
does not do anything unless a file exists. If a file exists, then it uses a
TStringList.LoadFromFile(FileName);
Try the following test. I tried this using D7 and D2007. No TestRB.ini file
was created.
uses
ppIniStorage;
procedure TForm1.Button1Click(Sender: TObject);
var
lIniFile: TppIniFile;
lsValue: String;
begin
lIniFile := TppIniFile.Create('c:\TestRB.ini');
lsValue := lIniFile.ReadString('SomeSection', 'SomeValue', 'HelloValue');
lIniFile.WriteString('SomeSection', 'SomeValue', lsValue);
lIniFile.Free;
end;
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
No packages in the application and it happends outside of the IDE as well.
I'll do a bit more checking to see if I can track it down further. I can
see it creating the rbuilder.ini right when it attempts to create the
preview window in two different applications but not in a third so I'll need
to find out what is triggering it.
--
---------------------------------------
Terry Swiers
Millennium Software, LLC
http://www.1000years.com
http://www.atrex.com
Atrex Inventory Control/POS -
Big business features without spending big business bucks!
Atrex Electronic Support Options:
Atrex Knowledgebase: http://www.atrex.com/atrexkb.asp
Email: mailto:support@atrex.com
Here are the steps to reproduce the problem.
1. Create a new Win32 project.
2. Drop a TppReport object on the main form.
3. Add ppEndUsr reference to the main form uses clause.
4. Drop a TButton object on the main form and have the on click event call
ppReport1.Print.
Run the program and print the emtpy report to the screen.
You are correct that just creating the TMemIniFile object or reading from it
will not create the actual file. But a call to TMemIniFile.Update file does
cause the file to be created.
I traced the cause of the problem to the following code in the
TppIniFile.Destroy function.
begin
if (gbDesignTime or (GetClass('TppDesigner') <> nil)) then
TMemIniFile(CustomIniFile).UpdateFile;
Since the TppDesigner class is being registered as part of the
initialization section, the destructor calls the UpdateFile function which
creates the zero byte RBuilder.ini file in the \Windows\System32 folder.
Any suggestions on how to prevent this?
--
---------------------------------------
Terry Swiers
Millennium Software, LLC
http://www.1000years.com
http://www.atrex.com
Atrex Inventory Control/POS -
Big business features without spending big business bucks!
Atrex Electronic Support Options:
Atrex Knowledgebase: http://www.atrex.com/atrexkb.asp
Email: mailto:support@atrex.com
When TppDesigner is present use the TppDesigner.IniStorageType and
IniStorageName to control RBuilder.ini. To prevent a file from being
created, set the IniStorageName to blank. For RB 11 we are adding an
additional IniStorageType called IniStorageNone to make it more explicit.
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Thank you for the workaround for this bug.
--
---------------------------------------
Terry Swiers
Millennium Software, LLC
http://www.1000years.com
http://www.atrex.com
Atrex Inventory Control/POS -
Big business features without spending big business bucks!
Atrex Electronic Support Options:
Atrex Knowledgebase: http://www.atrex.com/atrexkb.asp
Email: mailto:support@atrex.com