Discussion Locked

Automatic Reactivation of Dynamic Disk

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Windows XP
I have an external SATA drive plugged into the USB port. It is configured as dynamic.
Each time the computer is reboot, the drive needs to be reactivated through the disk management console.
Is there any way to have this automatically reactivated during the windows startup sequence?
Would it be different if it was a Basic disk?
Thanks!
-notsosupergenius ;)

8 replies

by athens.springer

At a command line type in "Diskpart". You will see a command like:
DISKPART>
Now type in "list disk"
You will see a list of disks on your system and if your dynamic disk is currently offline it will have a status of "offline" and probably just a number under the Disk ### column. Other disks you will notice will be named "Disk" then their number such as "Disk 10". Once you figure out which is the one that you want type in "select disk".
You will now see:
"Disk is not the selected disk."
Now simply type in "online".
Once the disk is online you can type exit.
Now that you are familiar with the commands and what they do, create a text file, put the commands into it, rename the extension .bat and put it in your startup folder or leave a convenient link to it on your desktop. The commands inside the batch file would look like this:

diskpart
select disk9
online
exit

NOTE:
If a disk is online it is referred to with a space between "disk" and that disks number as follows:
Disk 9
But if a disk is offline (that state you are concerned with) it will be:
Disk9

by it_enthusiast

When I start up my computer, the command prompt autmatically pops upand performs only the first command. I had performed the steps that you listed earlier. I even tried to include the 'list disk' command. Please help.

by it_enthusiast

I created both the batch file and the script.exe file and I placed them both in the startup folder. The problem is now when the pc starts up both files are loaded but the and the bath file does not execute the commands in the script.exe file. I would have to close them and manually open the .bat file and it works.
My question is, how do I tell diskpart where to find the .txt file or where do I put the .txt file (not in startup foleder I assume) so it can execute the commands in it when the .bat file is loaded on startup?

by sam.claret

Well the command would read
diskpart /s "c:\scripts\script.txt"

The double quotes would only be if you had spaces in it........

You should only have one thing in the startup folder and that would be the just the bat file with the diskpart command in it.

Sam

This discussion is closed to new replies.