Frosty555
asked on
Copy files as backup operator
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?
How can the program identify itself as a backup operator instead, so that I can access the files?
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.
ASKER
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?
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
you can have a .net program execute using a different user's credentials somehow?
I do not know few that can be done.