The Disk Management MMC snapin has a "Offline" function:

Screenshot of Disk Managment showing the "Offline" context menu item

Once used, a disk shows as Offline, with hover text "This disk is offline because of policy set by an administrator".

However, if the OS does not boot due to the contents of the disk this state can not be reached.

How can this be done to an offline system, using the recovery/Windows PE environment?


This information is stored in the registry under

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\(disk\device\path)\Device Parameters\Partmgr

There is a DWORD value named "Attributes" with the following values:

0 = Online

3 = Offline

(decimal or hexadecimal are the same)

Device paths tend to contain some part of the device bus and name. The device path on my test system was SCSI\Disk&Ven_&Prod_LITEONIT_LMT-256\4&35b1cb49&0&040000.

Screenshot of registry tree

So the generalised steps are:

  1. Boot into the recovery environment
  2. Mount the registry offline.
  3. Edit the registry key. In an offline system there is no "Current" ControlSet so change all of ControlSet001, ControlSet002, etc as appropriate.
| improve this answer | |

Open a command prompt and then enter the following commands in sequence:

list disk <-This will give you a list of disk on the system
select disk 0 <-replace 0 by the disk ID  that you want to put offline
| improve this answer | |
  • The dispart command operates on a running OS and will not persist this state to an offline system. – Fowl Feb 12 '18 at 23:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.