Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Windows 7, Virtual PC automatically uses “C:” as its “boot” drive designation.

I’d like to change the Virtual PC "boot" to something else, say, “Z:”, so that I can then tell the Virtual machine, "net use C: \\tsclient\c", to access files on my Windows 7 C: drive.

How can I change the Virtual PC “boot” drive letter?


To be a little clearer, I want the Local Disk in VPC mode to be something other than C:.

Alt text

share|improve this question

2 Answers 2

What you can do is share the drive with your VM using a different drive letter.

  • Shutdown the VM
  • Open command prompt on Windows 7 (host). You say you want to share the folder C:\ with the VM.
  • Enter subst S: C:\ into the command window. This subst command will create a virtual drive S: which is mapped to C:. (Make sure the drive letter is free for use)
  • Open settings for the VM and make sure S: is ticked in the drive selection as shown below:

Source: (TechNet Blogs > Windows Virtual PC > Folder Sharing between Windows 7 and VM)

share|improve this answer
    
Thank you. That’s very useful! But to be a little clearer, I want the Local Disk in VPC mode to be something other than C:. !Alt text –  Alcuin Feb 15 '13 at 5:26
    
@Alcuin - I understand that, could you explain why though? Changing the System drive letter is amazingly, annoyingly difficult. I remember when I installed Windows 7 on a new hard drive. I still had my XP partition on another drive, and windows 7 decided that it's system drive letter would be D:. Even after I had wiped the XP partition, I still couldn't find out how to change that drive to use C:. I ended up formatting AGAIN just to get it to revert to C:. Perhaps you can do what I did, give the VM access to your C: drive before you install windows on the virtual HDD? –  Robotnik Feb 18 '13 at 5:22
    
I have legacy code. It addresses files on C: Not only must I run that legacy code on this box, I am also running it on old boxes still running XP OS. Changing the code for one box makes no sense, and is liable to lead to all kinds of errors that cannot be anticipated: it’s just inviting a world of trouble. The better solution is to alter the virtual boot drive. If I move the virtual PC “boot” from “C:” to another drive letter, I can then net use C: \\tsclient\c and use my legacy code without interruption. –  Alcuin Feb 18 '13 at 9:56
    
@Alcuin I haven't tried it for what you're using, but could you use Disk2VHD to create a virtual copy of an existing (physical) HDD with your legacy stuff set up, and use that as your bootable VM drive? –  Robotnik Feb 19 '13 at 5:25
    
I could, but that wouldn’t resolve the issue. I need to address what’s on my Windows 7 C: drive as C: in my code. Disk2VHD is going to have a virtual “C:” drive, too. I can’t address \\tsclient\c as “C:” unless the virtual drive has a letter other than C:. Besides, I already have everything where it needs to be: software installed, files in place. All I need is to alter the virtual default drive letter. –  Alcuin Feb 19 '13 at 14:46

These are the steps you need to take to rename the C: drive. This is not recommended and may cause other issues to arise

  • Log on as an Administrator.
  • Run Regedt32.exe.
  • Go to the following registry key: HKEY_LOCAL_MACHINE\\SYSTEM\\MountedDevices
  • Click MountedDevices.
  • On the Security menu, click Permissions.
  • Verify that Administrators have full control. Change this back when you are finished with these steps.

  • Quit Regedt32.exe, and then start Regedit.exe

  • Locate the following registry key: HKEY_LOCAL_MACHINE\\SYSTEM\\MountedDevices
  • Find the drive letter you want to change to (new). Look for \\DosDevices\\C:.
  • Right-click \\DosDevices\\C:, and then click Rename. Note You must use Regedit instead of Regedt32 to rename this registry key.
  • Rename it to an unused drive letter \\DosDevices\\Z:. This frees up drive letter C:.
  • Find the drive letter you want changed. Look for \\DosDevices\\D:.
  • Right-click \\DosDevices\\D:, and then click Rename.
  • Rename it to the appropriate (new) drive letter \\DosDevices\\C:.
  • Click the value for \\DosDevices\\Z:, click Rename, and then name it back to \\DosDevices\\D:.
  • Quit Regedit, and then start Regedt32.
  • Change the permissions back to the previous setting for Administrators (this should probably be Read Only).
  • Restart the computer.
share|improve this answer
    
Just to be clear: that will leave my Windows 7 C: drive appearing to the VM as "C: \\tsclient\c", while the VM will boot to "Z:". Is that correct? –  Alcuin Sep 9 at 9:18
    
@Alcuin - yes it should. Note that you're doing these steps inside the VM itself, where C: is currently the VM boot drive and Z: is the base (Windows 7) drive, mounted –  Robotnik Sep 10 at 0:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.