Automating installation rename optical and SSD/HDD during post install

Page 1 of 3 123 LastLast

  1. Posts : 48
    Windows 10 x64 1809
       #1

    Automating installation rename optical and SSD/HDD during post install


    Does anyone know of a way to rename drives in a system via powershell, registry or commands (eg DISM, WMIC, etc).. NOTE: Powershell's get-disk does not appear to detect optical drives.

    I have 10 PCs. They have a varying number of drives. All have at least one optical, all have at least one SSD and HDD. The SSD always has two partitions at least; 96GB for Windows and whatever is left over for a second or possibly a third partition.

    Each PC connects to a server and maps drive letters M: - Y:

    I have standardized letters for all PCs based on usage.

    D:\ is always for games
    E:\ Is always for downloads
    F:\ is for media/content creation/editing and related tasks
    G:\ is used for general data
    H:\ is used for programming, scripting, web design and related tasks (If present)

    I want optical drives to always be A: and B: Windows always starts at D: during install, which varies from PC to PC (It never seems to see the drives in the same order during install, even if I always put SSD on SATA port 0, optical on Port(s) 2 (and 3), and HDDs or other SSDs on the next few ports.

    I can't use diskpart - This is for use in setupcomplete or autounattend.xml.

    Now that I think about, I vaguely recall reading something about this a few years back... To figure out which drive should have which drive letter we'd need other specifics, such as disk type (SSD, HDD), and size.

    Anyone think this is doable?

    thanks
      My ComputerSystem Spec

  2. Berton's Avatar
    Posts : 5,958
    Win10 Home and Pro, Win10 Insider Preview, WinXP Home Premium, Linux Mint, Win7 Pro
       #2

    Just a couple of observations, one is that traditionally drives A: and B: have been reserved in the BIOS for floppy drives. Depending upon the motherboard there may even be a socket for the ribbon connector between the board and a drive. Those two drive letters may be a legacy thing in Windows even if the BIOS doesn't show them, may be awhile before that changes mainly because an OS/Operating System has to encompass a wide span of hardware, can't really make massive changes to millions of machines overnight.

    Another thing is about the ODD/Optical Disc Drive, it may help for Windows identifying it if there is actually a disc in the drive. There's also settings in Windows about hiding empty drives that should help.

    If a computer is on a Network, the mapping of a drive by Windows usually starts the lettering at Z: and works back up the alphabet.

    If wanting the OS installed on the C: drive in every computer it should be the only drive connected to the same socket/port on the motherboard [usually 0 or 1] in each then when the OS is running good shut them down and reconnect the other drives in order. The order of connection was pretty well set with PATA drives but SATA use has changed things between the BIOS and the OS.
      My ComputerSystem Spec

  3. Compumind's Avatar
    Posts : 1,306
    Windows 10 Pro x64, Various Linux Builds, Internet Security Specialty.
       #3

    Hi there...

    These are built-in conventions to the Windows OS (not just specific to Windows 10) which software developers follow by default.
    Look and see how many sub-partitions are created in a typical Windows 10 install, they do not use letters.

    Some drives can be reassigned, usually past "J", others not.

    FYI -

    Change and Assign Drive Letter in Windows 10

    How to Change a Drive Letter (Windows 10, 8, 7, ...)

    It's good practice to follow the conventions for the most part, IMO.

    Hope this helps. Cheers.

    Last edited by Compumind; 2 Weeks Ago at 22:35.
      My ComputerSystem Spec


  4. Posts : 48
    Windows 10 x64 1809
    Thread Starter
       #4

    <sigh> Perhaps I over did it with the amount of detail.

    I'm not writing applications for the wild. The drive letters I assign to shares on my server or what I call my local drives is not a matter of software development standards.

    I'm automating the installation of Windows on PCs in my home environment.

    I'm not referring to the recovery or system partitions that do not get assigned drive letters, nor am I wanting to change the C: drive.

    I know how to change drive letters with interactive tools like computer management and diskpart.

    Let start again. Forget everything I said in the OP.

    The question is;

    How do I change or reassign a drive letter from a command line or using powershell, regardless of drive type?

    Thank you.

    - - - Updated - - -

    Berton said: View Post
    traditionally drives A: and B: have been reserved in the BIOS for floppy drives. Depending upon the motherboard there may even be a socket for the ribbon connector between the board and a drive.
    Floppy drives? yeah, 20 years ago. Ribbon? Do you mean IDE cable? Or are you thinking laptops?

    I've been using A: and B: for Optical drives for almost 2 decades. Have to! I keep running out of drive letters. And I've never had a conflict with any application, OS (since Windows 2000), or BIOS. There are certainly no "hard" restrictions preventing the use of A: and B:
      My ComputerSystem Spec

  5. Plankton's Avatar
    Posts : 1,337
    Windows 10 Pro
       #5

    I know how to change drive letters with interactive tools like computer management and diskpart.
    You say you know how to do that.......then turn right around and ask it again just using a different format to do the exact same thing, regardless if it's the C drive or optical drive or floppy drive.....a drive is a drive.

    I'm automating the installation of Windows on PCs in my home environment
    This is what you're really wanting to do.....and if so, changing the drive letters has nothing to do with "Automating the installation of windows on all your PC's" at your home.

    So I'm confused as to what you're trying to do?????
      My ComputerSystem Spec


  6. Posts : 48
    Windows 10 x64 1809
    Thread Starter
       #6

    This is super simple.

    • I remove/disconnect all drives that is not for the boot drive.
    • I install Windows, reconnect all drive and power up
    • I go into computer management and change letters of drives to be what I want them to be.
    • I then run a huge script that customizes windows settings, installs programs and does a million other things. This script expects specific drives to be in place because the script does several restores. I ALWAYS do clean installs, never in place upgrades.


    All I want to do is change those drive letters from a command line or powershell script I can call from or include in my script. And that most certainly has everything to do with automation.

    At that point I can then use set up complete or autounattend.xml and then there is ZERO manual intervention in the installation process. This turns a 6 hour job into a 5 minute automated process.

    My script automates every aspect of the post installation process of Windows (OOBE and beyond), installation of games and programs, Group Policy settings, registry tweaks, scheduled tasks etc. The only reason it's not totally unattended (or "Automated" as I call it), is because I have to manually intervene to change drive letters.
    Last edited by Wobitancrawfodi; 2 Weeks Ago at 22:22.
      My ComputerSystem Spec


  7. Compumind's Avatar
    Posts : 1,306
    Windows 10 Pro x64, Various Linux Builds, Internet Security Specialty.
       #7

    Are we getting closer?

    How many systems are we speaking about?

    https://docs.microsoft.com/en-us/windows/deployment/windows-deployment-scenarios-and-tools

    Perhaps Macrium or Acronis imaging to dissimilar hardware?

      My ComputerSystem Spec


  8. Posts : 48
    Windows 10 x64 1809
    Thread Starter
       #8

    Yes, I looked at Macrium, In fact it's one of the programs that is installed by my script.

    10 PCs. The script "knows" about the various requirements of each PC (what programs, drivers, drives etc). But this is the deployment process for a new version of Windows so there are no images existing that I can use Macrium to restore. Of course, once the process is complete, Macrium creates an image which I can then use should I need to recover a PC to a "pristine" state.

    I typically do a once a year refresh (unless issues demand additional installations). Usually the YY09 Windows version I do over Christmas after spending months testing it. The Windows image is customized using MSMG Toolkit, then a USB drive is created with all the various motherboard and other drivers, applications and scripts.

    Thanks for the link. I'd previously read a lot of the MS docs on this subject, but alas the one thing I can't find the answer to is the changing of drive letters from a command line.
      My ComputerSystem Spec

  9. Compumind's Avatar
    Posts : 1,306
    Windows 10 Pro x64, Various Linux Builds, Internet Security Specialty.
       #9

    Wobitancrawfodi said: View Post
    I'd previously read a lot of the MS docs on this subject, but alas the one thing I can't find the answer to is the changing of drive letters from a command line.
    Please explain, if different from the above.

      My ComputerSystem Spec


  10. Posts : 48
    Windows 10 x64 1809
    Thread Starter
       #10

    Compumind said: View Post
    Please explain, if different from the above.
    I'm getting dizzy.

    I didn't ask the question here without having gone looking for the answer myself. I've spent a lot of time developing my script. That would have been near impossible without the Microsoft docs, and help from users at MDL, Bleeping Computer and so on. But the one question I can't find an answer to is "How to change/reassign a drive letter from the command line".

    I started the script when 1703 came out. The link that you provided is a place I spent a lot of time, as well as privacy and security settings sites (including Microsoft's), group policy settings and a number of websites dealing with security, hardening Windows and powershell, DISM and WMIC references.

    Though all of those travels I cannot find the answer to that one question.

    Does that make things crystal clear now?
      My ComputerSystem Spec


 
Page 1 of 3 123 LastLast

Related Threads
Solved Optical drive will not install in Drivers and Hardware
Toshiba Satellite laptop. New problem in the last few days. Windows 10 version 1809. Trying to send backup data to a flash drive, I noticed that the flash drive was labeled as 'D' instead of 'E' . Went to device manager, cd/dvd drive and saw this...
i just reinstalled windows and on my old install i had all my user profiles go to the e drive and not the c on this new install i want to do the same thing however i cannot rename the old user directory to users-old as it will cause explorer.exe...
Hi all, I'm sure this question has been asked multiple times, but it seems this forum is active, so hopefully someone can help me! I just ordered Windows 10 off newegg.com for a custom gaming PC i'm building. I'm not sure if its coming as a...
Solved Automating Password sign in in User Accounts and Family Safety
Using the "Netplwiz" in the Run box, I was able to automate the sign in password upon initially booting up my machine. When I first start up my machine, it immediately goes to my desktop without asking for the password. So far, so good. But when...
So I went to Microcenter and bought a Windows 10 Pro OEM version and it won't load at all on optical player. I have secure boot disabled and the keys are not installed either. For troubleshooting I have tried to use a different computer with a...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 15:39.
Find Us