Need BAT file to change my drive letters

Page 1 of 2 12 LastLast

  1. Posts : 294
    Win 10
       #1

    Need BAT file to change my drive letters - Moderator remove post pleas


    I’m dual booting Win 10 and Win 8 or Win 10. Wen I make changes, like booting to a different HD, my drive letters change. Is there a way to use a BAT file to change my drive letters? I may use my macro program to have the BAT file run every time I boot or I may decide to only use it when needed.


    Typically what happens is the wrong HD is assigned to G, so I have to change it’s drive letter to T. I then need to assign my backup HD to G and then remove a letter F from a system reserved partition. If I had a BAT file that would do this then I could easily tweak it to solve any drive letter issue

    Thanks,
    Last edited by Brink; 15 Apr 2016 at 08:02. Reason: moved to proper forum
      My Computers


  2. Posts : 265
    Windows 10 Enterprise
       #2

    Go here and see if this will do what you want it to:

    How to add or remove drive letter using batch file
      My Computer


  3. Posts : 294
    Win 10
    Thread Starter
       #3

    Nice technique, but it didn't work for Win 10. I see it was Jan 2013. I carefully followed the directions and when I ran the BAT file the Command Prompt opened, but it was totally blank - no text. I wonder if it needs to be an Elevated Command Prompt. If so how do I initiate that in a BAT file?

    I think once I get this to work, I can adapt it to all I want to do. I’d first just get the individual drive changes to work and if that works. I can create 1 BAT file that doe search drive one at a time. I hope we can get this to work. Any ideas?
      My Computers


  4. Posts : 1,366
    Windows 10 Pro x64
       #4

    Is there a specific reason you need to dual-boot as opposed to virtualizing Windows 8? Dual-booting presents a number of issues that are eliminated with virtualization. It is a much more simple setup, and your drive letters will always remain the same.
      My Computer


  5. Posts : 265
    Windows 10 Enterprise
       #5

    DeaconFrost said:
    Is there a specific reason you need to dual-boot as opposed to virtualizing Windows 8? Dual-booting presents a number of issues that are eliminated with virtualization. It is a much more simple setup, and your drive letters will always remain the same.
    I have to concur with this statement. Running Windows 8 in virtualization works well AND you can run Windows 10 and Windows 8 side by side AND you can also run your favorite Linux version too.

    But, going back to the original question...it might have to be an administrator prompt. If I get time this coming weekend I will play with this and see if I can come up with anything. No promises...
      My Computer


  6. Posts : 294
    Win 10
    Thread Starter
       #6

    I looked into virtualizing in the past. If I understand it correctly I have to install Win 8 from scratch into one of the virtual partitions and can’t just restore an image file into that virtual partition. I have a very complicated audio computer and installing Win 8 from scratch is not worth it

    I have lots of Acronis image feels for Win 8 and Win 10, and when I need to dual boot I need to go to those old images, when everything was working well..

    I have 16 gigs of RAM, yet the current problem I'm having with WIn 10 is a 32 bit program which can only use 4 gigs of RAM and works fine in Win 8 yet in WIn 10 it crashes right away. It's a software bug in my audio card that they haven't fixed related to RAM. So I’m also concerned that my virtual Win 8 won't have the full 4 Gigs of Ram, since I think you have to ration out the Ram between the virtual systems.


    So unless I’m mistaken about these limitations, this is why virtualization won’t work. I don’t have to dual boot that often, but like the option of doing so.
      My Computers


  7. Posts : 1,983
    Windows 10 x86 14383 Insider Pro and Core 10240
       #7

    If the PC has plenty of resources, then Virtual machines can be utilized so they have little effect on performance.

    On more limited hardware, there may be little point in running virtual machines because both host and guest VM suffer in terms of performance.

    In a dual boot situation, all the available resources of the PC are open to the OS that has booted.

    There are good reasons for dual booting that virtualization does not address:

    If the host OS fails to boot, then the VM cannot run, and the system is unusable.It is an all the eggs in one basket situation.

    If the host boots OK, and the VM guest fails to boot or is somehow corrupt, it may not be possible to access the data within the VM, or to repair it.

    Virtual disks can be much more hungry for disk space as they are used than real partitions are, especially if recommended virtual disk sizes are used.

    Of course, the usual caveat regarding back-ups applies. In the case of the former failed system, the backup can be the total disk size of host plus VM. If the VM is to be backed up independently, it is dead easy to take snapshots of the VM at any time.

    Some hardware devices and peripherals may not be available to the host system due to missing legacy drivers, and virtualization of an older OS on this system may or may not be able to directly drive these devices.

    In a dual or multiboot system, each OS is independent and may access data from other systems on the machine, and even be used to repair the other systems. Each may be backed up independently.

    Multiboot systems use all the PC hardware natively, as long as drivers are available. Legacy hardware may be present as unknown devices, or disabled in more recent OSs, but available to legacy OSs booting on the same PC.

    Drive letters are a nuisance in a multiboot situation, but only if the multiboot is set up in a haphazard fashion.

    If all drives are setup from booted DVDs, on separate partitions, each Windows installation will exist in a their own C drive, and all the other drives will have a different letter and order. Chaos!

    If the first booting OS is set up as C, the second and subsequent OSs installed from within the first OS, then each successive OS resides on a partition that keeps the same drive letter at the time of installation, and the relative drive letters are common across all the operating systems.

    To reset drive letter references within a multi-booting OS system, certain drive imaging utilities can do this, as the OS is moved and reapplied to a new volume letter.

    My underspecified systems, including my 4GB RAM 500GB HD laptop multi-boot faultlessly, but are useless with VMs.
      My Computers


  8. Posts : 294
    Win 10
    Thread Starter
       #8

    play2mefish said:
    I have to concur with this statement. Running Windows 8 in virtualization works well AND you can run Windows 10 and Windows 8 side by side AND you can also run your favorite Linux version too.

    But, going back to the original question...it might have to be an administrator prompt. If I get time this coming weekend I will play with this and see if I can come up with anything. No promises...
    I’ve tried doing this manually with both types of CMD and diskpart. The commands work. It seems it does need an administrator prompt. How to get that into a BAT seems tricky. The technique was posted in 2013 before Win 10. We could use a revised version. If you can experiment with this, that would be great.

    Thanks,
      My Computers


  9. Posts : 1,983
    Windows 10 x86 14383 Insider Pro and Core 10240
       #9

    Or a .reg file merge.

    Set the drive letters the way you want then export the following key and all subkeys.

    HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices

    Save the .reg file and merge at startup.
      My Computers


  10. Posts : 294
    Win 10
    Thread Starter
       #10

    Fafhrd said:
    Or a .reg file merge.

    Set the drive letters the way you want then export the following key and all subkeys.

    HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices

    Save the .reg file and merge at startup.

    Yes I figured that'd be a solution also. I guess I'm a little concerned if something was different with the HD configuration if that would mess up my registry. A solution not involving the registry would be preferred. ideally a BAT file or some utility program
      My Computers


 

  Related Discussions
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 09:40.
Find Us




Windows 10 Forums