Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open disks in windows and read data at low level?

I know in linux it is as simple as /dev/sda but in Windows how do you open a disk and start reading data at the low level?

In python I've tried:

f = open("K:", "r")

and I get this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: [Errno 13] Permission denied: 'K:'

I get this error even as administrator.

like image 716
nobody Avatar asked Jun 29 '11 14:06

nobody


People also ask

How do I access my disk drive on Windows 10?

If you're running Windows 11, Windows 10, or Windows 8, you can view all mounted drives in File Explorer. You can open File Explorer by pressing Windows key + E . In the left pane, select This PC, and all drives are shown on the right.

How do I access Disk Management?

To start Disk Management:Click Start -> Run -> type compmgmt. msc -> click OK. Alternatively, right-click on the My Computer icon and select 'Manage'. In the console tree, click Disk Management.


1 Answers

From http://support.microsoft.com/kb/100027

To open a physical hard drive for direct disk access (raw I/O) in a Win32-based application, use a device name of the form

\\.\PhysicalDriveN

where N is 0, 1, 2, and so forth, representing each of the physical drives in the system.

To open a logical drive, direct access is of the form

\\.\X: 

where X: is a hard-drive partition letter, floppy disk drive, or CD-ROM drive.

like image 88
Jim Garrison Avatar answered Sep 22 '22 18:09

Jim Garrison