Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 11th, 2006, 8:51 PM   #1
NightShade01
Programmer
 
Join Date: Oct 2005
Posts: 52
Rep Power: 4 NightShade01 is on a distinguished road
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??
NightShade01 is offline   Reply With Quote
Old Jun 11th, 2006, 9:08 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Jun 11th, 2006, 11:41 PM   #3
Booooze
Expert Programmer
 
Booooze's Avatar
 
Join Date: Mar 2006
Location: Igloo
Posts: 710
Rep Power: 3 Booooze is on a distinguished road
Send a message via MSN to Booooze
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.
Booooze is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:13 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC