Drive access rigths
Posted on 2004-10-19
Hello windows security experts!
I'm working in a application that must access to a drive, but:
- only administration has permission to access the drive
- most of the users of the application don't have administration profile
- so, it's necessary to unblock the drive, copy the files again and block again it
I wonder if is possible to write a C or C++ program to unblock the drive, even if the program is executed by the normal user that doesn't has persmision to read the drive.
I supose that there is a command like UNIX 'sudo' or something like that, to perform this action. I have been looking a solution using the 'DeviceIoControl' command, but I think I'm missing somethig because the application can't control a device if it has no rigths to do it (becouse of the profile).
The process could be like that:
1) get rigths to control a device
3) copy files
5) cancel rights
Any suggestion or code piece?