I have a little program that I want to store some application settings in the local users Application Data folder, i'm creating this program with Delphi 7, however whenever I try to use TiniFile to write some information to the inifile if it doesn't exist (defaults basically).
Here is the code i'm using to try and write to the inifile...
case cType of
SettingsIni := TIniFile.Create(sLocalSett
if assigned(SettingsIni) then begin
M', 'AllowChanges', 'True'); //THIS IS THE LINE IT DIES AT
M', 'StartupFolder', 'Outlook Today (HN Style)');
M', 'TabSite','HN Folder');
Settingsini := TIniFile.Create(sLocalUser
Address, 'UserType', 'Local');
Address, 'StartupFolder', 'Outlook Today (HN Style)');
abSite', 'HN Folder');
for Reference the sLocalSettingsPath = the Windows API App Data folder + '\EM\HN.ini'
I've checked the path and its all fine. I can create folders either manually or with Delphi, but cannot edit this ini file. As a test I've also created a blank ini file in this location, and it still breaks down at the same spot.
If anyone has any ideas, it would be greatly appreciated. If you require more info, please let me know, I'll be checking this regularly as I need to find a solution quite quickly. While these settings I could store in the registry (and at some point I might even change that) this is a Outlook Addin that requires a seperate PST File to be stored locally, in a location that would be somewhat secure from Users accidently deleting their information.