Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Copy files as backup operator

Posted on 2008-06-19
5
Medium Priority
?
271 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

604 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