DriveInfo.GetDrives Seems To Be Listing USB & DVD Drives Wrong?
Mar 11, 2012
I use the following code to look at the first 10 drives, list them in a listbox, and display each drive size when the listbox item is clicked.The issue I'm having is that "my computer" tells me my USB drive is "L" and my DVD drive is "E" but when I run my project, the USB seems to be listed as "E" and the DVD drive is something else.
I try to write a file to the selected drive - the USB drive in my list "E", it gives the device is not ready error, like I'm trying to write to the DVD drive with no DVD in the drive.
[Code]...
View 3 Replies
ADVERTISEMENT
Mar 6, 2012
As you see some months ago i use count property in one of my code
But now when i use driveinfo.getdrive.count it doesn't have it?
View 5 Replies
Feb 16, 2010
I am listing all logical drives with GetLogicalDrives() function and i am getting that----( A: , C: , D: , K: , M:)[code]If i checks "Get FilesCount (Drive_name)" for A: (Floppy Drive) then I gets error "DRIVE NOT READY".I want CODE WITHOUT THIS ERRORRR Even if floppy drive is empty or a CD/DVD-ROM is empty.
View 1 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
May 8, 2010
All I am trying to do is write a simple program that will let me choose a directory and get a listing of all files in that directory and its sub-directories and show it in a RichTextBox. I got as far as being able to select the directory but when I click "OK" I get "access to c:documents and settingsstevedesktopmp3 is denied".The code I am using is listed below.
Imports
System
Imports[code].....
View 10 Replies
Jan 12, 2010
I've got a DataGridview I want to remove columns from as it greatly increases performance when I format the DGV. The first time I remove columns in a loop (using the removeat) property, everythings fine. But when I try to remove more columns in another loop, it appears to remove the wrong columns and displays the wrong data. In other words, it displays the wrong data and headers; and the columns it does show has headers and cells that don't match.
[Code]...
View 2 Replies
Mar 25, 2010
I don't have any problem with the OpenFileDialog provided I set the .InitialDirectory to somewhere or other on my machine.However I just can't set the .InitialDirectory to a URL even as "http:localhost/..." ie my machine.Is there some way of getting the OpenFileDialog to see Network Drives, URLs, etc?
View 7 Replies
May 8, 2010
I want to display all the drives and folders , and user can select the file also
i got this code from one of forum, but it is showing all the files but not folders and directives
{code]...
View 9 Replies
May 5, 2011
I'm trying to get a list of current hard drives (that part is done), but then go through the list one by one and remove those that have no size (dvd drives for example). I'm sure this is horribly wrong (4 errors are shown in the list). Could someone give me a hand?
Here is what I have so far:
ComboBoxHD.Items.AddRange(System.IO.Directory.GetLogicalDrives)
Dim dInfo As New System.IO.Directory
For Each drive As System.IO.Directory In dInfo.GetLogicalDrives()
[code].....
View 2 Replies
Nov 12, 2009
I want to get mounted and unmounted drives using vb.net. Using getlogicaldrives methods we can get mounted drive. but i want to get unmounted drives also.
View 1 Replies
Nov 4, 2011
How to list all network drives.I have the below code, but is there any other alternates..[code]
View 6 Replies
Sep 2, 2009
I'm trying to show progress bars for the drive size but automatically get the number of drives abd and show progress bars for that number of drives. I've been playing with it for hours,
[Code]...
View 4 Replies
Jan 15, 2011
I am trying to use the WMI code generator, and it has given me some code, the idea is I want to see where the pagefile is and its size etc. The code I have is
[Code]...
View 2 Replies
Aug 18, 2010
Display Size Of Logical Drives
View 23 Replies
Jun 21, 2010
i want to get all drives and their directories and sub-directories displayed on a tree view just as windows explorer.
View 1 Replies
Aug 3, 2010
SPECS: Visual Basic 2008 - SP1/2, Framework 3.0.3.5, Windows XP Pro, SP3? trying to wright code for checking for existing files but what has me stumped is the (WHAT IF PART) of it witch in fact is what I want to see. What im saying is can I find a file without knowing where it is on all drives? Or how can i find a folder if I dont know where they installed it to.
Example: I know that C:Perfect World International <--- is the default location where my game installs but what if I installed it on D:Perfect World International; or rather on drive G or H. How would I test to see if it exist without making a bunch of nested If statements to test every drive for it.
this also applies to files like: D:Perfect World EntertainmentPerfect World Internationalelementelementclient.exe is there a way to find these files to see if they exist. I know that Perfect world international does not use the program files to put there program files in as you see above. so Envirnment variables I think cant be used correct me if I'm wrong. BUT I know the registry of a computer keeps some stord information as to where these applications are installed to like (References App Data).
What I'm trying to do is use this to tell the user in a Label that the game is installed in this path but I know in some circumstances the game is not installed on drive C: or D: or even in this directory some users can install it in there own directory such as C:PWI. and as such the file elementclient.exe can even be in C:PWIelementclient.exe. So to sum it all up can this be found useing some sort of code to find the file and folder and return them both in 2 difrent labels like this
Game Is Installed In: C:Perfect World International
Game Client Name: elementclient.exe, C:Perfect World Internationalelement
Game Found On Drive: C:
ETC.
I'm thinking and keep thinking that this can be done in many ways but as for environment variables I'm stumped. But perhaps windows registry may play a role in doing this but I myself don't even know where this stuff may be found; and even more how to apply it to code.
View 5 Replies
Sep 7, 2010
I'm in need of a way to find the original path of a substituted (Virtual) drive, set with the subst command.
Start -> Run -> type "cmd"
[code]
subst l: c:\scripts
[\code]
This create a virtual drive that points to c:\scripts\
in .net an easy way to get all the drives on the computer is using the Drive property of My.Computer.FileSystem. However, this will give you the current substitued name of the drive. Is there a way to find the original path?
I get the path of the virtual drives mapped to network folders using WNetGetConnectionA of mpr.dll, However, this only resolves mapped network drives.
I currently don't have away to find the original path of LOCAL virtual drives.
View 3 Replies
Sep 13, 2009
there is function that forces explorer.exe to refresh (and new drive icon appear). Then I can access it.My issue is that I have start up script(gpedit.msc-windows settings-cripts to mount several disks by using SUBST command.But Windows Explorer not shows them after start up.- It's enough to kill explorer.exe and then start it again.
View 6 Replies
Apr 18, 2010
For some reason, I can only run my program at college where I created it. It runs off of E:/ (usb port) so when I take it home, it won't run as at home, my E:/ is a CD Drive. How can I change my program so that it runs off of all drives?
View 4 Replies
Apr 22, 2011
I'm working on a project and would like to know the best way to tackle disabling the cd burner in windows.The first step I took in the project was disabling USB flash drives from being used.
View 1 Replies
Mar 10, 2010
I am writing a program and want to run the program from the cd drive rather than installing it. What I want to know is how can I work out someones cd drive path, and code it to the rest of the file location so that I wont get errors. Also where would I put this code. So my hard drive path is
C:Moonshine
Obviously users drive letters change, hence my problem.
View 7 Replies
Jan 24, 2012
In VB.NET, how can I search all hard-drives (regardless of whatever a machine has C, D or more) for specific file types (for example .mp3)? I want the file path to be return along with the file size.
View 2 Replies
Feb 20, 2009
I am writing a program in VB 2008 and need to search for SD Card Slots and monitor them. When a card is inserted I want to check for a files and folders and make a button active to upload the data. I take it this needs to be working in the background as I want to be able to perform other functions while monitoring fo the drives.How would I do this and can you check if a removeable drive is SD/MMC, CF, MS, etc?
View 3 Replies
Jan 28, 2012
I need any kind of script that will search through the network drives for a txt file called "Don'tDelete.txt" There is one drive the "U:\" drive and on there is 100 different folders with the "Don'tDelete.txt" file in it. Now every "Don'tDelete.txt" is different. I need the script to find these files, combine them all together into one new txt file locate in the "U:\Newfolder" so later on I can drop the new txt file onto my flash drive.
[Code]...
View 1 Replies
Feb 15, 2010
I configured access control list for the local drives using System.Security.AccessControl
I need to configure it for removable drive .
View 3 Replies
Feb 29, 2012
I need to create an application that will restore a user's mapped drives from a database. To do this, I need to create a script that will automatically back up the user's mapped drives on logon.
What would be the best way to go about doing this?
View 2 Replies
Apr 11, 2012
how can i map network drives using visual studio 2010?I would like to map multiple servers when running my program.
i.e
X:\ip or servername
Y:\ip or servername
would be automatically mapped into my computer when i run my program.
View 5 Replies
Jan 29, 2010
Recently I've started experimenting with Visual Basic 2008, and just out of curiosity am trying to password protect my flash drives. (At the school I go to, it takes a couple seconds for things to disappear). So, I've got it to the point where I can have multiple "accounts" with their own passwords, ive got a lost password button, and a bunch of other stuff. But, anybody can just click out of it and go into the folder themselves, so I've been looking for a way to lock the focus on my password box. I've looked for hours and have found a lot of things that keep the focus on like a second form, so you cant go back to the first one, but I was still able to launch applications and things because the desktop was still active. I still haven't found one that keeps the focus locked on the first form and nothing else.
View 2 Replies
May 23, 2009
I want to make 2 dynamic comboboxes; The first will list all the hard-drives/thumb-drives etc, the second will list all the CD/DVD drives.Beneath each combobox there will be a set of buttons that control the selected drive:Beneath the hard-drive combobox there will be two buttons: one is "open" (will open the select drive in explorer) the other is "remove" (checks if the selected drive is removable and if so safely removes the drive).Beneath the CD/DVD combobox there will also be two buttons: one is "open" (will open the drive's contents, if present, in explorer), the other is "autorun" (will execute the autorun for the disc).
View 18 Replies
Nov 3, 2010
Im beginer for programming vb. show list folder on drives. for example, I have a form (listbox and button). If I click the button, the listbox will show list folder on drive C.
View 1 Replies