accessing CD/DVD-ROM without drive letters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to open a pdf file from a CD in my VB app. I'm using
System.Diagnositcs.Process.Start to open the file, but I can't use
d:\file.pdf because not all cd-rom drives are named d:\. How can I get around
this?
 
Well, if there is someway to use a relative path so that the application just
looks on the CD that called it, it wouldn't matter how many CD drives were on
the machine. That's the functionality I'm looking for.
 
Jedi10180 said:
Well, if there is someway to use a relative path so that the application
just
looks on the CD that called it, it wouldn't matter how many CD drives were
on
the machine. That's the functionality I'm looking for.

'Application.StartupPath' + 'System.IO.Path.*'.
 
I have tried Application.StartupPath, but since the application has to
install the .Net framework (I'm assuming this is the reason),
Application.StartupPath returns a temp directory on the local hard drive. So
using that in the System.Diagnostic.Process.Start call doesn't work because
that's obviously not where my pdfs from the CD are stored. The more I think
about this, the less I think that there might be a way around it. I hope I'm
wrong - any other ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top