|
-
Aug 6th, 2003, 05:39 AM
#1
Thread Starter
Addicted Member
Drive Info
Hi All,
I am new to VB.Net. Is there any function which will get me whether the drive is CDROM drive or not? Plz treat this as urgent.
-
Aug 6th, 2003, 06:22 AM
#2
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Aug 6th, 2003, 10:52 AM
#3
Frenzied Member
It can be done using WMI class. Look at the last post by Edneeis in this thread:
http://www.vbforums.com/showthread.p...hreadid=241348
Ofcourse there are some limitations for WMI classes. Some may not be available in all Windows and also you need WMI service running on the machine. Actually WMI class are wrappers for API's. So you maybe able to do that with some API's.
Last edited by Lunatic3; Aug 6th, 2003 at 10:57 AM.
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
-
Aug 6th, 2003, 11:50 PM
#4
Thread Starter
Addicted Member
Drive Info
I tried using WMI, System.Management Namespace to get the CD Drive, but i came to know that using WMI has some limitations. One of the limitations is always WMI should be running in the system. Is there any other solution to achieve the same without using WMI.
-
Aug 7th, 2003, 12:22 AM
#5
Frenzied Member
you may have to stick to API
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
-
Aug 7th, 2003, 01:57 AM
#6
Lively Member
Using the windows scripting.....
Hi,
Try to using the scripting. Add the windows scripting into your project and then import it to your project.
Use the following
Dim fso as new scripting.filesystemobject
dim drv as scripting.drive
For Each drv In fso.Drives
msgbox("Drive " & drv.DriveLetter & ", Filesystem = " & drv.filesystem)
Next
Check the filesystem and other info you have in the "drv" to indentified CDROM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|