Board index » delphi » Run Code under "Proxy" account

Run Code under "Proxy" account

I'm not sure which newsgroup is the right one for posting this question so
I've posted it here and will wait for feedback.

I have written a Delphi 6 application that (among other things) makes
changes to files on our NT network.  I don't want to explicitly grant access
to these files to my users.  I would like to have my program access another
network account that has the necessary permissions and then make the changes
under that account.  I don't know the correct terminology for this approach
("proxy account"?, "run as"?) so it's been difficult to search the
newsgroups for ideas.  I'd like to avoid using third-party components that
do this(if there are any).  Thanks for your help.

Ed

 

Re:Run Code under "Proxy" account


<<E Zapalac:
I'm not sure which newsgroup is the right one for posting
this question so I've posted it here and will wait for
feedback.

Quote

I'd suggest borland.public.delphi.nativeapi.

--
Deborah Pate (TeamB) http://delphi-jedi.org

  TeamB don't see posts sent via Google or ISPs
  Use the real Borland server: newsgroups.borland.com
  http://www.borland.com/newsgroups/genl_faqs.html

Re:Run Code under "Proxy" account


Quote
E Zapalac wrote:
> I'm not sure which newsgroup is the right one for posting this question so
> I've posted it here and will wait for feedback.

As Deborah has said, the b.p.d.nativeapi group is the correct one to
post this in.

Quote
> I have written a Delphi 6 application that (among other things) makes
> changes to files on our NT network.  I don't want to explicitly grant access
> to these files to my users.  I would like to have my program access another
> network account that has the necessary permissions and then make the changes
> under that account.  

Check the LogonUser and ImpersonateLoggedOnUser API call.  Give it a
try, and if you can't get it working let me know (in the correct group)
and I'll go through my source tree and post a working example of it.

Regards,
Scott

Other Threads