Matthew,

your approach is NOT going to work if there is more than one CDROM drive in a computer for several reasons. First of all, it will ALWAYS return the last drive letter assigned to a CDROM even if your programs are on the first one. this is because you are using a loop without any exit conditions. Moreover, as i already mentioned, you are not checking the IsReady property either, so your program wont work if you dont have the CD in the last drive anyways.

think of it this way:

Drive C - hard drive
Drive D - CDROM
Drive E - CDROM
Drive F - CDROM
Drive G - hard drive

Your CD is in drive E.

The way your code is, driveletter will always get assigned to the F drive which is NOT what you want.

Get rid of that loop (it will never work as you have it now) and use the code i posted above. The only way a loop like that will work is if you check the IsReady property and look for something unique on the CD, like a filename you burned to the root of the disk.

IMO there isnt much else to help you with in regard to this problem until you address the underlying issues in your code. even if you get what you have working, it WILL break and you will be right back here asking questions (which isnt a problem, but lets save everyone some time!).

Good luck