Mitsules, Mark S. (Newport News)
Mark.Mitsules at ngc.com
Tue Dec 9 14:57:55 CST 2003
Brett, I know little of creating services, but if the local user has access to the directories you are interested in, this may help. Watch out for wrap. **************************************************** From: System Administration Scripting Guide V1.1 **************************************************** Copy Folders Using WMI Description Uses WMI to copy the folder C:\Scripts to D:\Archive. Script Code strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colFolders = objWMIService.ExecQuery( _ "Select * from Win32_Directory where Name = 'c:\\Scripts'") For Each objFolder in colFolders errResults = objFolder.Copy("D:\Archive") Wscript.Echo errResults Next **************************************************** -----Original Message----- From: Brett Barabash [mailto:BBarabash at tappeconstruction.com] Sent: Tuesday, December 09, 2003 2:23 PM To: 'accessd at databaseadvisors.com' Subject: [AccessD] OT (sorta) security impersonation For quite a while now I have used a simple batch file to automatically copy new files to a users' desktop. Now, I have a new challenge. All of our workstations are configured to restrict access to the WINNT directory and its subdirectories. To copy a file to these directories I need to be logged on as an admin. I would like to develop a VB app that would run on each desktop, either as a normal executable or as a service, that would authenticate itself as an admin and copy the necessary files. If I run it as a service, it looks like I can setup a security profile for the service in the control panel. Has anyone out there done anything like this? Drew, I know that you have a lot of experience with creating services. Any good resources that you can point me to? Brett Barabash, MCP Tappe Construction, Co. Eagan, MN bbarabash at tappeconstruction.com (651) 256-6831 "One thing a computer can do that most humans can't is be sealed up in a cardboard box and sit in a warehouse." -Jack Handey ---------------------------------------------------------------------------- ---------------------------------------- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the originator of the message. This footer also confirms that this email message has been scanned for the presence of computer viruses. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Tappe Construction Co. Scanning of this message and addition of this footer is performed by SurfControl E-mail Filter software in conjunction with virus detection software. _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com