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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. How to find out HD Size of a computer without using WMI

How to find out HD Size of a computer without using WMI

Scheduled Pinned Locked Moved C#
tutorialquestion
4 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.
  • C Offline
    C Offline
    Cadence2 0
    wrote on last edited by
    #1

    Hey there, Is there any way to (programatically) find out the hard disk size of a computer without using WMI? My best idea is to recurse through all the directories (externally calling dir/p) and find out how much space is taken by each directory and then adding it to the free space. But that is quite cumbersome. Any ideas?

    -K

    W 1 Reply Last reply
    0
    • C Cadence2 0

      Hey there, Is there any way to (programatically) find out the hard disk size of a computer without using WMI? My best idea is to recurse through all the directories (externally calling dir/p) and find out how much space is taken by each directory and then adding it to the free space. But that is quite cumbersome. Any ideas?

      -K

      W Offline
      W Offline
      Wjousts
      wrote on last edited by
      #2

      Why not use WMI?

      C 1 Reply Last reply
      0
      • W Wjousts

        Why not use WMI?

        C Offline
        C Offline
        Cadence2 0
        wrote on last edited by
        #3

        Actually, I like WMI a lot. However, the application is required on an embedded system running Win XP Embedded that doesn't have WMI as a component. :~

        -K

        L 1 Reply Last reply
        0
        • C Cadence2 0

          Actually, I like WMI a lot. However, the application is required on an embedded system running Win XP Embedded that doesn't have WMI as a component. :~

          -K

          L Offline
          L Offline
          leppie
          wrote on last edited by
          #4

          I would definately find a better solution than 'dir /p' :) Maybe P/Invoke?

          **

          xacc.ide-0.2.0.50 - now with partial MSBuild support!

          **

          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