Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Detecting CD-Rom Drive

Detecting CD-Rom Drive

Scheduled Pinned Locked Moved C#
question
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shady Aly
    wrote on last edited by
    #1

    hi all , how can i detect that my application is running from CD-Rom Drive and not from HD thank you

    M L 2 Replies Last reply
    0
    • S Shady Aly

      hi all , how can i detect that my application is running from CD-Rom Drive and not from HD thank you

      M Offline
      M Offline
      Majid al Sarra
      wrote on last edited by
      #2

      use Environment.CurrentDirectory to get the current directory of your application and check it yourself:cool:

      1 Reply Last reply
      0
      • S Shady Aly

        hi all , how can i detect that my application is running from CD-Rom Drive and not from HD thank you

        L Offline
        L Offline
        Luis Alonso Ramos
        wrote on last edited by
        #3

        Better than the current directory (suggested in the other post) use Application.StartupPath. It will always contain the folder where the EXE is located, even if the application changes the current directory (possible and more or less common.) -- LuisR


        Luis Alonso Ramos Intelectix - Chihuahua, Mexico Not much here: My CP Blog!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups