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. format disk [modified]

format disk [modified]

Scheduled Pinned Locked Moved C#
question
8 Posts 4 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.
  • L Offline
    L Offline
    LordZoster
    wrote on last edited by
    #1

    hallo i need to programmatically format a hard disk. Apart from ShFormatDisk, it seems that there's a hope by using FMIFS.DLL or UNTFS.DLL. Has anyone a piece of code to show me? Out there there are just old broken links to sysinternals site regarding FMIFS.DLL. Thanks in advance

    modified on Friday, December 12, 2008 3:00 PM

    G 1 Reply Last reply
    0
    • L LordZoster

      hallo i need to programmatically format a hard disk. Apart from ShFormatDisk, it seems that there's a hope by using FMIFS.DLL or UNTFS.DLL. Has anyone a piece of code to show me? Out there there are just old broken links to sysinternals site regarding FMIFS.DLL. Thanks in advance

      modified on Friday, December 12, 2008 3:00 PM

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      Why do you want to format a disk? Are you writing a virus?

      Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

      L 1 Reply Last reply
      0
      • G Giorgi Dalakishvili

        Why do you want to format a disk? Are you writing a virus?

        Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        If he was it would be a shitty virus, no gain in formatting a disk. Maybe he means a removable storage device?

        L 1 Reply Last reply
        0
        • L Lost User

          If he was it would be a shitty virus, no gain in formatting a disk. Maybe he means a removable storage device?

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

          thanks for the interesting replies, it's curious that everywhere i find a thread for "hard disk formatting" there's somebody asking if it is for virusing. Sounds like if a programmer wants to write a scanner software, it is for duplicate identity cards... Evil Is Everywhere :P BTW has anyone serious idea of how to write a function to erase an internal (no removable, no flash memory) hard disk?

          L U 2 Replies Last reply
          0
          • L LordZoster

            thanks for the interesting replies, it's curious that everywhere i find a thread for "hard disk formatting" there's somebody asking if it is for virusing. Sounds like if a programmer wants to write a scanner software, it is for duplicate identity cards... Evil Is Everywhere :P BTW has anyone serious idea of how to write a function to erase an internal (no removable, no flash memory) hard disk?

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Nah can't help you there, I can't see any possible gain at all for formatting an internal hard drive. Tasks like that should be done by a user without any programmatical assistance through any application not specifically designed for that, it can lead to accidental formats, which should be limited and not encouraged.

            1 Reply Last reply
            0
            • L LordZoster

              thanks for the interesting replies, it's curious that everywhere i find a thread for "hard disk formatting" there's somebody asking if it is for virusing. Sounds like if a programmer wants to write a scanner software, it is for duplicate identity cards... Evil Is Everywhere :P BTW has anyone serious idea of how to write a function to erase an internal (no removable, no flash memory) hard disk?

              U Offline
              U Offline
              Uwe Keim
              wrote on last edited by
              #6

              Tried looking through pinvoke.net[^]?

              • My personal 24/7 webcam - Always live ;-) • Holiday Season special – zeta producer Desktop 8 (CMS) including all modules for only $129! • Zeta Uploader - Easily send large files by e-mail. Windows and web client available.

              L 1 Reply Last reply
              0
              • U Uwe Keim

                Tried looking through pinvoke.net[^]?

                • My personal 24/7 webcam - Always live ;-) • Holiday Season special – zeta producer Desktop 8 (CMS) including all modules for only $129! • Zeta Uploader - Easily send large files by e-mail. Windows and web client available.

                L Offline
                L Offline
                LordZoster
                wrote on last edited by
                #7

                Thanks Uwe. Yes i tried, they mainly suggest ShFormatDisk. I'm trying to give my end users/customers a clean restore environment without dos boxes and nags, using imagex, but i need to format the disk before applying an image.

                L 1 Reply Last reply
                0
                • L LordZoster

                  Thanks Uwe. Yes i tried, they mainly suggest ShFormatDisk. I'm trying to give my end users/customers a clean restore environment without dos boxes and nags, using imagex, but i need to format the disk before applying an image.

                  L Offline
                  L Offline
                  LordZoster
                  wrote on last edited by
                  #8

                  solved: i launch a command line Process with FORMAT using /Y, an undocumented flag for the unattended mode :)

                  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