Windows 7: Moving Program Files location during install using unattend.xml

Posted by Shevek on Super User See other posts from Super User or by Shevek
Published on 2010-10-22T13:39:56Z Indexed on 2011/01/04 22:55 UTC
Read the original article Hit count: 268

Filed under:
|
|
|
|

I am planning on using an unattend.xml to create a Windows 7 Ultimate 64-bit setup with Users and ProgramData on a 2nd drive.

I have found many samples of how to do this (see below).

However I would also like to move Program Files to a 3rd drive as well.

i.e.:

C:\Windows             [SSD]

D:\Users               [HDD1]
D:\ProgramData         [HDD1]

P:\Program Files       [HDD2]
P:\Program Files (x86) [HDD2]

I have found that this was possible using unattend.txt in XP but all documentation or examples I find about Win 7 only mention Users and ProgramData, not Program Files.

Is this possible using an answer file?

Sample unattend.xml for Users and ProgramData:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
 <settings pass="oobeSystem">
  <component name="Microsoft-Windows-Shell-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="amd64">
   <FolderLocations>
    <ProfilesDirectory>D:\Users</ProfilesDirectory>
    <ProgramData>D:\ProgramData</ProgramData>
   </FolderLocations>
  </component>
 </settings>
</unattend>

© Super User or respective owner

Related posts about windows-7

Related posts about hard-drive