Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Reading INI files on window 7



Permlink Replies: 1 - Last Post: Dec 25, 2016 4:58 AM Last Post By: Eitan Arbel Threads: [ Previous | Next ]
shlomo abuisak

Posts: 64
Registered: 9/18/10
Reading INI files on window 7
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 29, 2015 8:31 AM
I do not get it
Delphi 7 window 7 and ini file.
If i exe my program outside Program Files (x86) the program reads the
ini OK.
If i exe my program with Delphi 7 IDE (the file is at Program Files
(x86) ) ini is OK
If i exe my program as usual (the file is at Program Files (x86) ) ini
is not OK as it is EMPTY.
I thought administrator rights so i added manifest for that and checked
that the program
has administrator right with procedure isAdmin; it is ok program has
admin rights.
Now what buffed me is that if i run the program with "Run as
administrator" (the file is at Program Files (x86) the ini file is
loaded OK.
I tried with TMemIniFile also.
Eitan Arbel

Posts: 421
Registered: 2/24/13
Re: Reading INI files on window 7
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 25, 2016 4:56 AM   in response to: shlomo abuisak in response to: shlomo abuisak
Hi Shlomo

just a few thoughts :
1. what if you set the program to run in Compatibility mode for WinXP ?

2. maybe you can add a listbox (or memo) to make the program show you exactly what it sees when you're not running in IDE?
set it to show what it see just before and just after it writes to the ini file, and run it from Program Files x86, with regular admin rights.

3. does it work if you run it from another folder in the Root? (like C:\abc) ?
if it works fine, then maybe it would be better if you install your program somewhere outside the Program Files

4. does it work if you run it from "C:\Program Files" (not with x86)?
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02