How to install a virtual hard disk on Windows XP

Barbara Coburn 0 Reputation points
2024-03-12T20:42:02.6566667+00:00

I'm trying to add a virtual hard disk to a pc with Windows XP Pro using the command "SUBST S: C:\DRIVES" and saving it as a "VIRTDRIVES.BAT" in the Start folder. I was told this would install a VHD with the drive letter "S", but it's not working. What am I doing wrong?

Thank you!

Windows Server Storage
Windows Server Storage
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Storage: The hardware and software system used to retain data for subsequent retrieval.
630 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Marcin Policht 9,505 Reputation points MVP
    2024-03-12T21:28:03.51+00:00

    The SUBST command in Windows is used to associate a drive letter with a specific folder, but it does not create or mount virtual hard disks (VHDs). If you want to mount a VHD as a drive letter, you would typically use the DISKPART command or the Disk Management tool.

    Here's an example of how you can mount a VHD using DISKPART (Replace "C:\Path\to\Your\VHD\File.vhd" with the actual path to your VHD file):

    diskpart

    select vdisk file="C:\Path\to\Your\VHD\File.vhd"

    attach vdisk

    exit

    After running these commands, your VHD should be mounted, and you can access it using the assigned drive letter.


    hth

    Marcin

    0 comments No comments

  2. Ian Xue (Shanghai Wicresoft Co., Ltd.) 29,491 Reputation points Microsoft Vendor
    2024-03-13T02:49:44.67+00:00

    Hi,

    Subst creates a virtual drive for a specified path. It does not mount virtual disks.

    https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/subst

    You can attach a vhd in Disk Management.

    1. Open Disk management. In the search box on the taskbar, enter Computer Management, and select Disk Management.
    2. On the Action menu, select Attach VHD.
    3. After the Attach Virtual Hard Disk dialog box opens, select the Browse button, and find your .vhd file.
    4. Now that you've selected the .vhd file, you return to the Attach Virtual Hard Disk dialog box. Select OK.

    https://learn.microsoft.com/en-us/windows-server/storage/disk-management/manage-virtual-hard-disks#attach-a-vhd

    Best Regards,

    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments