Jump to content

How to set Drive Letters in 2K/XP


BigDaddyO
 Share

Recommended Posts

I have some XP and 2000 computers that I am using Ghost with. the issue I am having is that if I reimage just the first hard drive and leave the second hard drive intact the drive letters for the second HDD reverts back to the first available instead of the prefered set drive letters. Is there any way for AutoIT to detect Drive letters on a 2nd HDD and then assisgn Partition one to a drive lettter and Partition 2 to another letter?

Thanks,

Mike

Link to comment
Share on other sites

you can assign drive letters after you ghost it, cant you?

just re-assign them

i dont understand why just re-imaging (making a copy) the drive would change its default drive letter..... but i also have never used ghost.

i dont remember how to assign drive letters, i forgot lol. but i dont know if you can even do that on 2000, i KNOW you can for sure on xp though

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

That DiskPart is so freakin cool, I can't believe I never knew about it. I shale share the code here along with info on making a DiskPart script for automating the DiskPart Utility

Opt("RunErrorsFatal", 0)
SplashTextOn("Drive Set", "Please wait while your drives are configured", 210, 60)
$TMP=EnvGet("TEMP")
FileInstall(".\DiskPart.exe", $TMP & "\DiskPart.exe")
FileInstall(".\Config.dat", $TMP & "\Config.dat")
$Val=RunWait(@ComSpec & " /c " & $tmp & "\Diskpart.exe /s " & $TMP & "\Config.dat", "", @SW_HIDE)
if $Val = 1 Then
   SplashOff()
   MsgBox(0, "Drive Config Failed", "Your drives were not assigned properly") 
Else 
   SplashOff()
   MsgBox(0, "Drive Set Complete", "Your Drive letters have been Properly Assigned")
EndIf
Exit

The Config.dat file is simply a txt file that has a DiskPart command per line.

mine has the following

Select Disk=1

Select Partition=2

assign Letter=Q

Select Partition=3

Assign Letter=R

exit

Edited by MikeOsdx
Link to comment
Share on other sites

Hi,

This is what i needed ! Many thnx.

At my work i use several usb sticks.

My first free drive is F: but is mapped to a network drive.

Stupid windows always maps usb sticks to F: that is already in use.

Now after inserting a new/changes stick i run a small AutoIt script that automatic remaps my stick to Z:

Andre

What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...