How do I Flip the Removable Bit of my USB Pen Drive or HDD in C# like this Tool does?
Thanks in advance!
How do I Flip the Removable Bit of my USB Pen Drive or HDD in C# like this Tool does?
Thanks in advance!
This is not easily done.
The "removable bit" is in the firmware of the controller on the device, not on the filesystem, and it is not accessible by anything but a custom tool for that device.
And since each chip manufacturer has different ways to access the firmware, and the firmware itself can be at different addresses, it is very unlikely that a universal tool can be made.
Your only option would be to sniff USB packets sent by the original utility, decode them and write a new tool which replicates the behavior.
The link you provide will not work on all USB devices, but works on many.
You could search the registry etc and use c# registry commands to flip bits etc. But there is no garantee that the underlying drivers will support the configuration. If you require this functionality than buy a drive that supports it.
This answer probably belongs on Super User: The least fuss way to use a USB drive appear as part of a Hard Drive, is set NTFS symbolic link. Which will make your usb drive appear as a directory. You wont be able to partition it like a hard drive though, but you will be able to index it etc - i have several non hard drive devices configured as symbolic links and the music contained on them appears in media player and windows libraries, all searchable and removeable.
or use the mklink command
What is the use of default keyword in C#? Is it introduced in C# 3.0 ?
I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...
I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...
I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...
I have two EF entities. One has a property called HouseNumber. The other has two properties, one called StartHouseNumber and one called EndHouseNumber. I want to create a many to many association ...
How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...
Since I cannot order my dictionary, what is the best way of going about taking key value pairs and also maintaing an index?
Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...