tags:

views:

163

answers:

2

Hi there, When my application is installed in "C:\Program Files..." in Win7 when I launch it, it can't have access to another executable file in the same directory. Other applications work well with this version of Windows except my app :(( I'm using Delphi 7

+2  A: 

There is a really good article here on developing apps for Windows 7 that addresses UAC issues specifically.

The upshot is, Program Files is regarded as a directory that should not be messed with lightly, Windows 7 wants elevated privileges to access resources from there.

Tim Jarvis
+1  A: 

Craig Stuntz typed here very good like that :

For Vista/Win7, your app can't put the files in a subfolder of Program Files / Programs unless UAC is turned off or the app is running as elevated. Note that "elevated" does not necessarily mean "logged in as Administrator." Non-administrator users can elevate, and Administrator isn't necessarily elevated.

SimaWB
By default all application started under administrator account are run with standard user privileges unless they ask for elevation. This is true at least for apps started through explorer (ShellExecute). I don't know about CreateProcess but it is probably the same thing.
Runner