I have a problem with raw disk access in Windows. I wrote program in Java, which works with USB flash device, reads its MBR and etc. Device is opened as RandomAccessFile.
If i open NetBeans and execute by program as usual user i have exception
Exception in thread "main" java.io.FileNotFoundException: \\.\PhysicalDrive2 (Отказано в доступе)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:241)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:122)
at main.USBFlashDevice.<init>(Main.java:90)
at main.Main.main(Main.java:196)
Java Result: 1
If i do it as admin, everything is OK.
What can i do to execute program and edit MBR when i work as usual user on somebody's PC?