Determine Physical Disk & Partition For A Drive Letter?
Oct 31, 2011
I am new to VB and playing with a program to display disk info attached to my PC. I have used WIN32_DiskDrive & WIN32_LogicalDisk to gather info regarding volumes, disks and partitions.
What I want to find how is how to relate the Device Index and Partition # back to a volume (ie with a drive letter).
View 2 Replies
ADVERTISEMENT
Feb 19, 2012
I'm running the following WMI script to get the associations between drive letters and physical drives on the system, but for some reason it omits CDROMs/DVD-ROMs. Can someone tell me how to get those as well?
Code:
ComputerName = "."
Set wmiServices = GetObject _
("winmgmts:{impersonationLevel=Impersonate}!//" & ComputerName)
Set wmiDiskDrives = wmiServices.ExecQuery _
("SELECT DeviceID FROM Win32_DiskDrive")
[Code3]...
View 12 Replies
Jun 16, 2009
I have a program that allows the user to enter a drive letter into a text box. The program then takes the letter and find the physical drive number (i.e. deviceharddisk3..). It then stripes out everything and leaves me with the number 3.
In VB6 I used mDrive.bas from vbAccelerator.com and it worked perfectly. I have been all over the internet and back and cannot find a solution written in VB.NET.
View 14 Replies
Jun 17, 2009
I am trying to get the physical drive (device) number from the drive letter. If the user inputs the drive letter C the program will find the associated physical device number. For example if I input C then the result needs to be \Device\HardDrive1\... Some call it NT Device Name; I think. I have the code for VB6 from vbAccelerator, which works perfectly, but it does not work in VB.NET. My question is there a simple way of pulling the drive info that contains the drive letter and the physical device number. I have searched the internet and found nothing for VB.NET. I would post code but I have nothing for .NET.
View 1 Replies
Jun 16, 2009
I have a program I am converting from VB6 to VB.NET and I am stuck at the very last piece of code. I need to determine what physical device number is associated with the drive letter.
The program takes the drive letter from a text box and goes and finds the device number (i.e. deviceharddrive3...) and strips out everything leaving me with the devicer number; in this case the number 3. I have searched the internet to and fro and found nothing in VB.NET.
My program in VB6 uses a .bas module from vbaccelerator.com called mDrive.bas and works great. I can't figure out how to convert it over to VB.NET.
View 6 Replies
Feb 19, 2009
First off a short background of the project I am working on- I am developing a program that will be run off removable media (i.e. USB Flash drive). This will be a �virtual desktop� which you will be able to take with you and have the same �desktop� on any system. As we know drive letters can change with each host system the drive is plugged into, I need to be able to determine the path for the flash drive and access a specific folder ( i.e. My Documents)
I have an picture box(representing the icon) placed on my form (form1) and when I click the icon I want to be able to open and view the a specific folder from the portable drive. I need a click event that will determine a dynamic drive letter for a directory on the removable drive and then open that directory in an explorer window.
[Code]....
View 1 Replies
Jun 26, 2010
Is there any way of accessing a file on a partition that has no drive letter (such as a hidden or recovery partition)?
View 1 Replies
Dec 24, 2010
i want to partition my pen drive using vb.net.i just wanted to know that is it possible to partition pen drives using vb.net.i want this to happen in the way that we can secure one partition using password!
View 3 Replies
Jun 25, 2012
I have seen numerous dvd playing apps that when you insert the dvd into the drive is displays the movie name. Im looking to implement something like this. I want to show a desktop alert showing the movie name when it has been put into the drive so the user can add it to the collection.
I have "googled" around for this and have found nothing on reading DVD info. how to get the dvd info from a drive?
View 4 Replies
Feb 14, 2011
I want to hook the keyboard and make some actions (in vb.net) when a specific physical key is pressed.I have found online several excellent keyboard hook dlls, but there is a problem: the hook dlls find the keycode of the pressed keys, not what physical key is pressed.So, for example, in a USA keyboard if I press the key on the left of the Right-Shif key I see the e.keycode: 191 (OemQuestion), in a italian keyboard I see the e.keycode 189 (OemMinus).This means that if I put in My.Settings the code "189", an italian user can see that has to press the key I want, an USA user see another key to press to have the same action because on it keyboard the OemMinus key is not on the left of the Right-Shift key.now the question is: how to determine univocally the keyboard keys? What do I have to put in My.Settings that determinate a specific physical key, the same for all the keyboard languages?
View 2 Replies
Oct 13, 2009
I want to make a tool that will assign a USB pen drive a drive letter, I am using WMI to acknowledge the device being plugged in, I can pull the deviceID, name, etc now I just need to work out how to assign the device to a drive and I just cant figure it out
View 4 Replies
Jun 18, 2010
What I'm looking to do is 'hook' a physical drive connected to the system so I can process data coming through the API before it's written to the disk. I have a sense DeviceIOControl is where I should be, but I can't seem to find any IOCTL code that uses a callback (which is what I expect I should be using to scan/process data on its way through the API).
View 2 Replies
Jun 12, 2010
I want my program to find the disk drive. I just do not know how to find it programmically? Can anyone help, please? This should be pretty easy, right?
View 12 Replies
Feb 20, 2012
I am trying to read some data from the MBR using CreateFile, but I cannot get it to work without admin rights. The code I am using is like this:
hDevice = CreateFile("\.PhysicalDrive0", GENERIC_READ, FILE_SHARE_READ Or FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0)
Is it possible to read data from the MBR without admin rights?
View 1 Replies
Jun 21, 2010
Im writing a program (has been a little while) which will gather files off my computer and make a new partition the right size to store them.I would like this to be automated since it would help if I use it on friends machines.is there a way for me to create a partition from using vb.net and api's etc rather than having to downloading partition manager each time.
View 4 Replies
Mar 12, 2011
I am using the following code to get a list of the letters for each drive on my computer. I want to get the drive letter of CD Drive from this list. The code I am using to get list is as below:
[Code]...
View 2 Replies
Jan 2, 2010
I have a function that copies files from a CD to my HDD:CopyFiles(CD_Drive, FullPath & "")
The problem is that the Drive letter "I:" is not consistent. Sometimes when I connect and disconnect external devices, the CD Drive letter changes and then my code doesn't work unless I open the project, change the letter "I" and recompile.What code can I use that will ALWAYS detect my CD Drive, regardless of the drive letter? (Like for instance, NERO will detect and burn CDs regardless of the drive letter)
dp.SyntaxHighlighter.ClipboardSwf = '/dp.SyntaxHighlighter/Scripts/clipboard.swf'
dp.SyntaxHighlighter.HighlightAll('4e1b98200b534bcfb11430c4ef5e5987')
View 3 Replies
Dec 10, 2008
Does anyone know if there is a way to determine if a drive is local or a network drive?
View 1 Replies
Mar 3, 2010
I am trying to get the HDD Disk Drive information from the DeviceIOControl(,,,,,) function with IOCTL_DISK_GET_DRIVE_LAYOUT_EX control code.
Here are the problems :
1. The DeviceIOControl function returns(as from output buffer) DRIVE_LAYOUT_INFORMATION_EX structure. Which contains some data types i am unable to get. I used. Uint32 instead of Dword. Long instead of Large_Integer.
2. DRIVE_LAYOUT_INFORMATION_EX structure contains a union declaration as mentioned on MSDN , HOW TO GET A UNION in VB.NET or vb 6.
3. Still when i tried declaring the data types as mentioned earlier gives an error (Value does not fall within the expected range.) executing the DeviceIOControl Method.
Link : [URL]
View 8 Replies
Nov 29, 2009
i'm trying to list out the what to pick when using the perfmon counter, physical disk. when you look at it in perfmon, it shows for example, 0 C:, 1 D:. I see how to get the drive letters avaliable on the sytem.. how in vb.net to get the disk id. i want to get a listing of all the hard drives on the system, both their ID and the drive letter.
View 7 Replies
Mar 3, 2010
I am trying to get the HDD Disk Drive information from the DeviceIOControl function with IOCTL_DISK_GET_DRIVE_LAYOUT_EX control code.
Here are the problems :1. The DeviceIOControl function returns(as from output buffer) DRIVE_LAYOUT_INFORMATION_EX structure. Which contains some data types i am unable to get.
[Code]...
View 4 Replies
Jun 23, 2009
If there is no floppy disk in the drive, i need the user to be informed, because when it comes to the loop
For Each File As String In My.Computer.FileSystem.GetFiles(Src, FileIO.SearchOption.SearchAllSubDirectories, "*")
My.Computer.FileSystem.CopyFile(File, String.Concat(Dst, Microsoft.VisualBasic.Right(File,
[CODE]...
View 1 Replies
Feb 16, 2011
I'm developing a system info application. I've Searched all over internet and only found code for Free Hard Disk space, but not Total hard disk space.
The code should calculate the Total space of all the drives.
View 7 Replies
Sep 16, 2010
I was wondering how do you find all HDD drive letter. I got a code but it will get the dvd drive letter. I only want it to show my all my HDD and USB if there is any connected.[code]...
View 2 Replies
Jun 29, 2011
I find a lot of VB6 examples out there, and a few C# examples, but no concrete solution in VB.NET. Simply put, I need to get the next available drive letter in as few lines of code as possible.
View 2 Replies
Aug 27, 2010
Iam trying to copy file to floppy disk rather than to hard drive. I try to use the code that I used in VB6 but there are so many errors. I gave up. Are any simple code the would do it? New C# Programmer
View 2 Replies
Nov 4, 2011
I have seen examples of enumerating through the available drives on a computer to obtain information about the drives.
But how do you change the volume label of a specific drive?
View 6 Replies
Jul 11, 2009
I ve a file in my computer.......
i want to knw the locetion of my file in the disk drive.....
View 16 Replies
Apr 24, 2009
Is it possible to find a drive's letter given one of the following two?
1) SCSI Address (eg 0/0/0)
2) NT Device Name (eg /device/CdRom0)
View 3 Replies
Jan 25, 2011
my question is how to find the drive letter. not all the comps have the same do they.?
View 3 Replies