![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Oct 2005
Posts: 52
Rep Power: 3
![]() |
CD-ROm detecting
Hey everyone i'm trying to write a program that contains many smaller things, such as batch files, text documents and other little programs. I want to be able to however have the program figure out what the CD rom drive is on the computer that the program is installed on....b/c obv it changes from comp to comp. Like if i instaled the prorgam on my computer and i have the E: drive as my cd-rom i need the program to auto detect that and then copy things from E: to the hard drive. i'm not sure how to go about doing this though. Any ideas??
|
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
This might be absolutely worthless to you, but I use winioctl in C/C++. You may find that VB has access to those things.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Expert Programmer
|
This shoudl help a bit:
string[] drives;//String array
drives = Directory.GetLogicalDrives();
//Display first 2 drives
MessageBox.Show(drives[0].ToString());
MessageBox.Show(drives[1].ToString());
//Determines whether specified Drive Exists
DriveInfo di = new DriveInfo("D:");
MessageBox.Show(di.DriveType.ToString());It's C#, but the framework is the same. All you should need are some small modifications such as the array (will be defined differently in vb.net) and maybe the messagebox function. Other than that, it should at least put you one the right track. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|