accessing CD/DVD-ROM without drive letters

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jedi10180

    accessing CD/DVD-ROM without drive letters

    I am trying to open a pdf file from a CD in my VB app. I'm using
    System.Diagnosi tcs.Process.Sta rt 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?
  • Herfried K. Wagner [MVP]

    #2
    Re: accessing CD/DVD-ROM without drive letters

    "Jedi10180" <Jedi10180@disc ussions.microso ft.com> schrieb:[color=blue]
    >I am trying to open a pdf file from a CD in my VB app. I'm using
    > System.Diagnosi tcs.Process.Sta rt 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?[/color]

    Well, what would you do if there is more than one Cd drive available on the
    system?

    Opening and closing the CD-ROM drive
    <URL:http://dotnet.mvps.org/dotnet/faqs/?id=setcddoorst atus&lang=en>

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    • Jedi10180

      #3
      Re: accessing CD/DVD-ROM without drive letters

      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.

      "Herfried K. Wagner [MVP]" wrote:
      [color=blue]
      > "Jedi10180" <Jedi10180@disc ussions.microso ft.com> schrieb:[color=green]
      > >I am trying to open a pdf file from a CD in my VB app. I'm using
      > > System.Diagnosi tcs.Process.Sta rt 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?[/color]
      >
      > Well, what would you do if there is more than one Cd drive available on the
      > system?
      >
      > Opening and closing the CD-ROM drive
      > <URL:http://dotnet.mvps.org/dotnet/faqs/?id=setcddoorst atus&lang=en>
      >
      > --
      > M S Herfried K. Wagner
      > M V P <URL:http://dotnet.mvps.org/>
      > V B <URL:http://classicvb.org/petition/>
      >
      >[/color]

      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: accessing CD/DVD-ROM without drive letters

        "Jedi10180" <Jedi10180@disc ussions.microso ft.com> schrieb:[color=blue]
        > 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.[/color]

        'Application.St artupPath' + 'System.IO.Path .*'.

        --
        M S Herfried K. Wagner
        M V P <URL:http://dotnet.mvps.org/>
        V B <URL:http://classicvb.org/petition/>

        Comment

        • Jedi10180

          #5
          Re: accessing CD/DVD-ROM without drive letters

          I have tried Application.Sta rtupPath, but since the application has to
          install the .Net framework (I'm assuming this is the reason),
          Application.Sta rtupPath returns a temp directory on the local hard drive. So
          using that in the System.Diagnost ic.Process.Star t 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?

          "Herfried K. Wagner [MVP]" wrote:
          [color=blue]
          > "Jedi10180" <Jedi10180@disc ussions.microso ft.com> schrieb:[color=green]
          > > 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.[/color]
          >
          > 'Application.St artupPath' + 'System.IO.Path .*'.
          >
          > --
          > M S Herfried K. Wagner
          > M V P <URL:http://dotnet.mvps.org/>
          > V B <URL:http://classicvb.org/petition/>
          >
          >[/color]

          Comment

          Working...