Solved

Copy files as backup operator

Posted on 2008-06-19
5
262 Views
Last Modified: 2013-12-04
In VB.Net I'm enumerating folders and files using DirectoryInfo.GetFiles(), and eventually I want to open and copy the contents of those files into a backup archive. When the program tries to access folders or files it does not have access to I get an Unauthorized Access Exception.

How can the program identify itself as a backup operator instead, so that I can access the files?
0
Comment
Question by:Frosty555
  • 3
  • 2
5 Comments
 
LVL 27

Expert Comment

by:planocz
ID: 21826322
You will have to have your network admin guy set you up with a special login name, and password for each of the directories you want to get to.
0
 
LVL 31

Author Comment

by:Frosty555
ID: 21831416
I am the network admin guy. Technically this is a product that will be installed on end user's machines.

Okay, so lets say I have a special user who is part of the backup operator's group (or administrator's group if that's necessary). How do I have Vb.net use that user's credentials to perform the copy? Or how does VB.NET identify that it is performing a "backup" or "restore" operation as opposed to just opening the file and reading it?
0
 
LVL 27

Accepted Solution

by:
planocz earned 500 total points
ID: 21831785
your right the program just runs the person that is login has to have administrator's group permission.
0
 
LVL 31

Author Comment

by:Frosty555
ID: 21837760
you can have a .net program execute using a different user's credentials somehow?
0
 
LVL 27

Expert Comment

by:planocz
ID: 21845838
I do not know few that can be done.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Security measures require Windows be logged in using Standard User login (not Administrator).  Yet, sometimes an application has to be run “As Administrator” from a Standard User login.  This paper describes how to create a shortcut icon to launch a…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question