Change Default Program Files Directories During Installation

MrCaffeineX

[H]ard|Gawd
Joined
Aug 22, 2011
Messages
1,604
I have a Lenovo U510 that I am working on that has a 24GB SSD Cache drive. The chipset does not support using Intel RST, but rather Lenovo's solution was to use a 3rd-party software application to manage the caching. I was thinking that 24GB is almost enough space for me to squeeze Windows 7 (I downgraded the machine from 8), but I will need to relocate the various user, programdata, and program files directories to the HDD so that the SSD doesn't fill up.

By following this guide I was able to relocate the default locations for the Users and ProgramData directories. My plan is to completely install and update Windows 7 Professional 64-bit in a virtual machine and then follow this guide to sysprep the machine, capture the install image with ImageX, drop it on my Windows 7 USB install flash drive, and then run sysprep again using the unattended XML file created from the previous guide.

Is it possible to relocate the program files directories (default: C:\Program Files & C:\Program Files (x86) ) in the same manner (i.e. using additional options in the unattend.xml file)? In theory, this would give me the basic Windows installation on the SSD, but the directories that will take up the most space (Users, ProgramData, Program Files, Program Files (x86) ) will all be located on the HDD. However, I can't seem to find whether or not this can be done and/or which options will need to be included in the unattend.xml file. Most articles talk about doing it after Windows has been installed through a series of registry edits, which is a possibility, but it seems like it would be cleaner to do via the unattend.xml process during sysprep.

Any help and/or suggestions that you guys can make would be appreciated, though please kindly refrain from "Why on Earth would you want to do that?" or "That's just a stupid idea." posts. I'm bored and it sure beats going into work on my day off. Besides, isn't this how people spend their free time? :)
 
I'm not sure I can be of much help for the installation portion, but if can't find a perfect solution then you could try and create a sim link for the directory and move all of the data to a second drive. I did this the first time I ran into space problems on my ssd with the stupid itunes folder that likes to grow exponentially.
 
Yeah, that's kind of the last-resort option and there seems to be some confusion about whether or not that works in the case of 64-bit versions of Windows. I was figuring since you can move the Users and ProgramData via an unattended XML file that if I knew the right strings to reference, I would be able to do the same for the Program Files directories before finalizing the installation. I could be wrong though.
 
Why not look at upgrading the SSD instead? :)

This guy appears to have spent considerable time doing exactly what you're talking about.
 
Time I have. Money, not as much. Plus I really didn't feel like tearing the unit apart, but I just did and found that it is an mSATA SSD that is used for the caching. Which puts me back at the lacking funding problem...

That guide seems helpful. I'm testing it in my VM right now. Thank you.
 
Last edited:
Also to keep in mind that if you have enough memory you can disable the page file or at least make it a static 1gb file. Additionally disable the hibernation and you will recover a decent amount of storage space.

As for the sim link, if done correctly the programs won't know the difference. I did mine under 64 bit win 7 and iTunes didn't have any issues.
 
As for the sim link, if done correctly the programs won't know the difference. I did mine under 64 bit win 7 and iTunes didn't have any issues.

Applications may not have any issues, but Windows itself has exhibited very strange behavior in some instances when I've dinked around with junctions to things it counts on being in specific paths. An inability to uninstall applications is something I saw more than once.
 
Back
Top