Win32 Write RAW Physical Disk Python 3.3.2

Jerry Hill malaclypse2 at
Fri Feb 21 22:46:16 CET 2014

On Wed, Feb 19, 2014 at 7:42 AM, khanta <khanta at> 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
( ),
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.


More information about the Python-list mailing list