Drew Wutka
DWUTKA at marlow.com
Thu Feb 13 15:48:01 CST 2003
Two ways I can think of. The easiest way, if this is for a machine or machines...that you have access to directly, is to create a Service in VB to let you do this. With a service, you can set what 'account' you want it to run as, which just takes the security nightmare out of the loop. The other way is to get into the NT security API's, where you create a User Token. It's very complex, and to tell you the truth I have never fully gotten into it, because I usually find a way around it. My co-worker digs those API's though, so if you want to go that route, I can ask if he has anything pre-written for that sort of thing. Drew -----Original Message----- From: Brett Barabash [mailto:BBarabash at tappeconstruction.com] Sent: Thursday, February 13, 2003 8:39 AM To: 'accessd at databaseadvisors.com' Subject: [AccessD] OT: WINNT directory permissions Does anyone know a way to programmatically copy a file to the WINNT directory on a W2K machine, if the user doesn't have write access to it? Is there a way to temporarily logon as an admin through code to do this? Brett Barabash, MCP Tappe Construction, Co. Eagan, MN bbarabash at tappeconstruction.com (651) 256-6831 "Quidquid latine dictum sit, altum sonatur." (Whatever is said in Latin sounds profound.) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030213/dc595c75/attachment-0002.html>