<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2722.900" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=114184521-13022003><FONT face=Arial color=#0000ff size=2>Two
ways I can think of.</FONT></SPAN></DIV>
<DIV><SPAN class=114184521-13022003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=114184521-13022003><FONT face=Arial color=#0000ff size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=114184521-13022003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=114184521-13022003><FONT face=Arial color=#0000ff size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=114184521-13022003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=114184521-13022003><FONT face=Arial color=#0000ff
size=2>Drew</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Brett Barabash
[mailto:BBarabash@tappeconstruction.com]<BR><B>Sent:</B> Thursday, February
13, 2003 8:39 AM<BR><B>To:</B>
'accessd@databaseadvisors.com'<BR><B>Subject:</B> [AccessD] OT: WINNT
directory permissions<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=828223714-13022003>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?</SPAN></FONT></DIV>
<P><FONT size=2><FONT face=Arial>Brett Barabash, MCP <BR>Tappe Construction,
Co. <BR>Eagan, MN <BR>bbarabash@tappeconstruction.com <BR>(651) 256-6831
</FONT></FONT></P>
<P><FONT face=Arial size=2>"Quidquid latine dictum sit, altum
sonatur."<BR></FONT><FONT face=Arial size=2>(Whatever is said in Latin sounds
profound.)</FONT></P>
<DIV> </DIV></BLOCKQUOTE></BODY></HTML>