Re: Delphi: Application permissions


[ Post Followup ] [ Delphi Forum -- by DelphiLand ]

Posted by webmaster Guido on December 29, 2003 at 19:46:01:

In Reply to: Application permissions posted by Gary Wakerley P12349 on December 28, 2003 at 19:22:07:

: I have developed an application that works fine when I use it with administration privileges. When I deploy it to user it does not work. When I use runas with administrator rights it is ok.
: Any help would be appreciated
: Regards
: Gary
---------------

This indicates that the program wants to access something that the "user" is not allowed to, such as accessing a part of the network, a folder, reading or writing a file,...

The best approach is working step by step: what is the user not allowed to do that might block the program?

1. Go through the code of your app and make a list of what it is accessing: which data files is it reading? writing? where are these files located? are you reading/modifying the registry?...

2. Next, try as "user" to access these data manually via Windows Explorer: find out if you can read and/ or write these files. Write access: can you overwrite them with something else?

3. Next, give the user the rights to access all that is needed for the app. Probably this will be a process of trial and error.
------------------

Another approach might be to disable big parts of the code, until it works; put parts between comment characters like this:

(* This part is disabled for debugging
code...
code...
code...
*)

When the app works for a "user", re-enable smaller parts of the code, until you find what access is causing the problem. Finally, give the user extra privileges.

Regards,
webmaster Guido


Related Articles and Replies:


[ Delphi Forum ]
[ DelphiLand: free Delphi source code, tips, tutorials ]