Sign in to follow this  
Followers 0
BigDaddyO

How to set Drive Letters in 2K/XP

7 posts in this topic

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


Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Yea, You can change the drive letters in 2K and XP using the Manage utiltiy but that is tuff since the drives may change and I don't like using mouse clicks. I was hoping for some dos based command line or even AutoIT functions to detect and rename drive letters


Share this post


Link to post
Share on other sites

It might not be exactly what you are looking for, but look for documentation on the SUBST command. This may be able to at least duplicate the drive to the letter you are looking for.

*** Matt @ MPCS

Share this post


Link to post
Share on other sites

Look at the command line tool diskaprt in 2k/xp. It will do exactly what you need.


Who else would I be?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

Share this post


Link to post
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!

Share this post


Link to post
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
Sign in to follow this  
Followers 0