Win32 Write RAW Physical Disk Python 3.3.2

Jerry Hill malaclypse2 at gmail.com
Fri Feb 21 16:46:16 EST 2014


On Wed, Feb 19, 2014 at 7:42 AM, khanta <khanta at gmail.com> wrote:
> Hello,
>  I am trying to write to the raw physical disk on Windows 8.1 but I
> get an error:
> PermissionError: [Errno 13] Permission denied: '\\\\.\\PHYSICALDRIVE2\\\\'

Is there a volume mounted from the drive at the time you're attempting
to write to the physical device?  According to some MSDN documentation
(http://msdn.microsoft.com/en-us/library/aa365747%28VS.85%29.aspx ),
it doesn't look like you can write to a physical device if the sectors
you're attempting to write are mounted at the time. There appear to be
a lot of caveats.  Take a look at the section of that page starting
with "If you write directly to a volume that has a mounted file
system, you must first obtain exclusive access to the volume." for
lots of details.

-- 
Jerry



More information about the Python-list mailing list