Asked by:
Invoking CreateFile() for Removable drive(CDROM,USB) from standard user success in Windows 7 and failed in Windows server 2008 reason?

Question
-
::CreateFile( _T( "\\\\.\\H:" ), GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0 );
above call returns access is denied when running with standard user token.
With SUA analyser it shows NT Authority System and Built in administrators are granted to WRITE. But in windows 7 it works with out any issue.
- Edited by Renjith V Ramachandran Monday, June 15, 2015 7:28 PM
Monday, June 15, 2015 2:36 PM
All replies
-
Thanks, Renjith V R
- Merged by Shu 2017 Tuesday, June 16, 2015 6:40 AM duplicate
Monday, June 15, 2015 2:41 PM -
What does GetLastError return after you call CreateFile?Monday, June 15, 2015 3:19 PM
-
How about using
GENERIC_READ|GENERIC_WRITE
instead of justThis may helps: File Security and Access Rights
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.Tuesday, June 16, 2015 6:52 AM -
How about using
GENERIC_READ|GENERIC_WRITE
instead of justThis may helps: File Security and Access Rights
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.Thanks, Renjith V R
Wednesday, June 17, 2015 5:13 AM