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\\\\'

OS: Windows 8.1
Python: 3.3.2
Drive is a USB drive
Running as administrator

Code Snippet:

       with open(r"\\.\PHYSICALDRIVE2\\", "rb+") as f:  #Writing Binary!
            f.seek(unallocatedoffset + 0)
            f.write(t1)


or

        with open('\\\\.\\PHYSICALDRIVE2\\', "rb+") as f:  #Writing Binary!
            f.seek(unallocatedoffset + 0)
            f.write(t1)

or

f = os.fdopen(os.open('\\\\.\\PHYSICALDRIVE2\\' os.O_CREAT |
os.O_WRONLY | os.O_APPEND | os.O_EXCL))


Any suggestions?  Is it possible?
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to