This project is read-only.

impossible to read a file?

Jan 10, 2012 at 3:38 PM

Hello

 

I've a problem, i do a md5sum on files to know if the file have some changes (i don't use only the date of the file)

 

so my question is: it's impossible to read a file if i do not have the privileges? i must copy before? ( i put the rights :

AdjustPrivilegeResult result = process.EnablePrivilege(Privilege.TakeOwnership);
AdjustPrivilegeResult backupResult = process.EnablePrivilege(Privilege.Backup);
AdjustPrivilegeResult restoreResult = process.EnablePrivilege(Privilege.Restore);
AdjustPrivilegeResult ManageVolume = process.EnablePrivilege(Privilege.ManageVolume);

so i can list folders, get size of files... but don't read files (i don't try copy a this time, just do a md5sum...)

)

 

Thanks for the response :)

Jan 10, 2012 at 4:41 PM

 TakeOwnership => Enabled (PrivilegeModified)
 Backup => Enabled (PrivilegeModified)
 Restore => Enabled (PrivilegeModified)
 ManageVolume => Enabled (PrivilegeModified)

 

 

mhhhh... i can't copy file

HRESULT : 0x80070005 (E_ACCESSDENIED

à System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)

Win32File.OpenRead (open a filestream....)

 

Have an idea?