Win32 Write RAW Physical Disk Python 3.3.2

K

khanta

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?
 
K

khanta

Can anyone tell me if it is not possible? It would save me a lot of time.
Has anyone ever written to the raw disk on windows?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top