Windows Vista Forums

VBS script to assign Drive Letter to Disk0, Disk1 etc.

  1. #1


    spacemancw Guest

    VBS script to assign Drive Letter to Disk0, Disk1 etc.

    I have a Blade Center attached to SAN.
    For each blade, each partition is a LUN on the SAN except for the swap
    partition.

    I use the internal hard drive in the blade itself for the swap
    partition, ie, where I place the pagefile.
    The blade sees the internal disk as Disk0, the rest of the luns as
    Disk1 Disk2 etc.

    Now I have a duplicate of this blade center and SAN in another
    location for Disaster Recovery. The luns are replicated from the
    primary to the secondary SAN. The blades are the same.

    When I bring up the blades on the DR side, some of them do not map the
    drive letter to the internal swap disk. I have to go into Disk
    Management and add the drive letter to Disk0.

    One or two of the servers do not assign drive letters to some of the
    LUNS. However the blade sees the LUNS because I see them in Computer
    Management. Again I have go there and manually assign the drive letter
    to the disk, and all is well.

    I am looking for a VBS script or a batch file that says:

    Assign letter 'D' to DISK0
    Assign letter 'F' to DISK3

    etc.

    I have seen VBS scripts that can change the Drive letter of a
    partition from say D to E. But here there is no drive letter to begin
    with. We are not changing, we are assigning.

    Thanks very much in advance.

      My System SpecsSystem Spec

  2. #2


    Pegasus \(MVP\) Guest

    Re: VBS script to assign Drive Letter to Disk0, Disk1 etc.


    "spacemancw" <spacemancw@xxxxxx> wrote in message
    news:5ef9cfc2-9ca3-4e03-a4ad-4e0defe77dde@xxxxxx

    >I have a Blade Center attached to SAN.
    > For each blade, each partition is a LUN on the SAN except for the swap
    > partition.
    >
    > I use the internal hard drive in the blade itself for the swap
    > partition, ie, where I place the pagefile.
    > The blade sees the internal disk as Disk0, the rest of the luns as
    > Disk1 Disk2 etc.
    >
    > Now I have a duplicate of this blade center and SAN in another
    > location for Disaster Recovery. The luns are replicated from the
    > primary to the secondary SAN. The blades are the same.
    >
    > When I bring up the blades on the DR side, some of them do not map the
    > drive letter to the internal swap disk. I have to go into Disk
    > Management and add the drive letter to Disk0.
    >
    > One or two of the servers do not assign drive letters to some of the
    > LUNS. However the blade sees the LUNS because I see them in Computer
    > Management. Again I have go there and manually assign the drive letter
    > to the disk, and all is well.
    >
    > I am looking for a VBS script or a batch file that says:
    >
    > Assign letter 'D' to DISK0
    > Assign letter 'F' to DISK3
    >
    > etc.
    >
    > I have seen VBS scripts that can change the Drive letter of a
    > partition from say D to E. But here there is no drive letter to begin
    > with. We are not changing, we are assigning.
    >
    > Thanks very much in advance.
    It's not VB Script but the command mountvol.exe can easily do this, provided
    that you know the volume ID of each partition.



      My System SpecsSystem Spec

  3. #3


    spacemancw Guest

    Re: VBS script to assign Drive Letter to Disk0, Disk1 etc.

    On Oct 21, 10:37*am, "Pegasus \(MVP\)" <I....@xxxxxx> wrote:

    > "spacemancw" <spacema...@xxxxxx> wrote in message
    >
    > news:5ef9cfc2-9ca3-4e03-a4ad-4e0defe77dde@xxxxxx
    >
    >
    >
    >
    >

    > >I have a Blade Center attached to SAN.
    > > For each blade, each partition is a LUN on the SAN except for the swap
    > > partition.
    >

    > > I use the internal hard drive in the blade itself for the swap
    > > partition, ie, where I place the pagefile.
    > > The blade sees the internal disk as Disk0, the rest of the luns as
    > > Disk1 Disk2 etc.
    >

    > > Now I have a duplicate of this blade center and SAN in another
    > > location for Disaster Recovery. The luns are replicated from the
    > > primary to the secondary SAN. The blades are the same.
    >

    > > When I bring up the blades on the DR side, some of them do not map the
    > > drive letter to the internal swap disk. I have to go into Disk
    > > Management and add the drive letter to Disk0.
    >

    > > One or two of the servers do not assign drive letters to some of the
    > > LUNS. However the blade sees the LUNS because I see them in Computer
    > > Management. Again I have go there and manually assign the drive letter
    > > to the disk, and all is well.
    >

    > > I am looking for a VBS script or a batch file that says:
    >

    > > Assign letter 'D' to DISK0
    > > Assign letter 'F' to DISK3
    >

    > > etc.
    >

    > > I have seen VBS scripts that can change the Drive letter of a
    > > partition from say D to E. But here there is no drive letter to begin
    > > with. We are not changing, we are assigning.
    >

    > > Thanks very much in advance.
    >
    > It's not VB Script but the command mountvol.exe can easily do this, provided
    > that you know the volume ID of each partition.- Hide quoted text -
    >
    > - Show quoted text -
    Ya I dont know the IDS. But what about DISKPART

    what is the syntax for mapping the drive letter D to DISK0.
    Keep in mind that I don't want to create any partitions on the disk.
    DISK0 is already formatted. I want to map D to all of DISK0.

    Thanks.

      My System SpecsSystem Spec


VBS script to assign Drive Letter to Disk0, Disk1 etc.
Similar Threads
Thread Forum
Reinstalled Windows on Disk1 need help in Refomatting Disk0 Vista installation & setup
Assign Letter to unformatted/wbfs-drive! Drivers
How do I PERMANENTLY assign a drive letter to an external hard dri Vista hardware & devices
Unable to assign drive letter? Vista installation & setup
Cannot assign drive letter Vista installation & setup