Change CD-ROM Drive Letter 
Author Message
 Change CD-ROM Drive Letter

  Hi,

  I need to change the CD-ROM drive letter on a large number of W2KPro
machines from D: to Z: during setup.  Can anyone suggest a method of
achieving this using a script.  I use WSH + VBScript for most of my
scripting, but can't work this one out.  I'm not tied to WSH though.  If KIX
or even the command line gave me the tools to achieve the result, I'm happy
to use them.

  I want to run the script locally on the machine with the 'RUN ONCE'
registry key after the machine has finished building.

  Thanks in advance.

  Jim



Sat, 14 Dec 2002 03:00:00 GMT  
 Change CD-ROM Drive Letter
In order to do it with a regwrite from script, you would need to know the registry entry for the device (and there might be more than one). The entry is hardware specific.

For example, I doubt you have a registry entry to match mine:

[HKEY_LOCAL_MACHINE\Enum\SCSI\ATAPI___CD-ROM_36X______L\MF&CHILD0000&PCI&VEN_8086&DEV_1230&SUBSYS_00000000&REV_02&BUS_00&DEV_07&FUNC_0110]
"CurrentDriveLetter"="D:"

--
Mark L. Ferguson    Please reply in Newsgroup
marfer's notes for OE 5 > http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm

Quote:

>   Hi,

>   I need to change the CD-ROM drive letter on a large number of W2KPro
> machines from D: to Z: during setup.  Can anyone suggest a method of
> achieving this using a script.  I use WSH + VBScript for most of my
> scripting, but can't work this one out.  I'm not tied to WSH though.  If KIX
> or even the command line gave me the tools to achieve the result, I'm happy
> to use them.

>   I want to run the script locally on the machine with the 'RUN ONCE'
> registry key after the machine has finished building.

>   Thanks in advance.

>   Jim



Sat, 14 Dec 2002 03:00:00 GMT  
 Change CD-ROM Drive Letter
As Mark has explained, there is not one specific Registry key you can use on all machines.  What would probably work is to have your script use Regedit to export the HKEY_LOCAL_MACHINE\Enum\SCSI key as a text file, walk that file to find all instances of the values "CurrentDriveLetterAssignment" and "UserDriveLetterAssignment", then RegWrite new data to each of those value paths as "Z" and "ZZ" respectively.

--

Bill James
Microsoft MVPDTS

?Free Win9x VBScript Utilities?
??New Address - Change your links!??
http://www.svvi.net/wgjames/vbspage/

Quote:

>   Hi,

>   I need to change the CD-ROM drive letter on a large number of W2KPro
> machines from D: to Z: during setup.  Can anyone suggest a method of
> achieving this using a script.  I use WSH + VBScript for most of my
> scripting, but can't work this one out.  I'm not tied to WSH though.  If KIX
> or even the command line gave me the tools to achieve the result, I'm happy
> to use them.

>   I want to run the script locally on the machine with the 'RUN ONCE'
> registry key after the machine has finished building.

>   Thanks in advance.

>   Jim



Sat, 14 Dec 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Set/Change CD-ROM drive letter with VBS

2. Change CD-ROM Drive Letter

3. Change CDROM drive letter via vbscript?

4. Retrieving drive letter for user's cd-rom drive

5. Newby: Determine CD-ROM drive letter

6. CD-Rom Drive Letter

7. Finding CD-ROM Drive Letter

8. CD-ROM drive letter?

9. CD-ROM drive letter. VB5

10. CD Rom Drive Letter

11. cd-rom drive letter prob

12. Use VB4 to determine CD-ROM drive letter?

 

 
Powered by phpBB® Forum Software