Determine drives attached

This is a discussion on Determine drives attached within the Windows Programming forums, part of the Platform Specific Boards category; Uhm, how do you know what drives are attached in the computer? Fixed Drives, Removable Drives, etc.. It should work ...

  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    9

    Determine drives attached

    Uhm, how do you know what drives are attached in the computer? Fixed Drives, Removable Drives, etc..

    It should work something like this (in vbs):

    Code:
    set filesys = CreateObject("Scripting.FileSystemObject") 
    set drvs = filesys.Drives
    for each d in drvs
    	Wscript.echo d
    next
    Thanks!

  2. #2
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,059
    Check out Win32_Logicaldisk. You'd probably want to use it with WMI. So, check out DispHelper. Especially the WMI samples. DispHelper will make writing the routine a lot easier.

  3. #3
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,673
    Here's info on C api as well.

    Obtain Cd-Rom path and one more

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Determine length of an array
    By ulillillia in forum C Programming
    Replies: 7
    Last Post: 04-21-2007, 08:32 PM
  2. determine how many 0's are in a number (value)
    By pyazarian in forum C++ Programming
    Replies: 4
    Last Post: 07-06-2005, 01:20 PM
  3. USB Drives???
    By khpuce in forum Tech Board
    Replies: 14
    Last Post: 12-12-2003, 08:01 AM
  4. installing hard drives and IDE cables...
    By dbaryl in forum Tech Board
    Replies: 14
    Last Post: 09-02-2002, 10:11 AM
  5. Probs with CD drives
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 03-11-2002, 10:09 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21