mrjrt Posted January 10, 2014 Posted January 10, 2014 Hello all.Just wondering if anyone can shed any light on my current quandry....I'm doing a spot of customisation and I'd like to rename the Windows directory. I was able to accomplish this in Windows XP by using:[SetupData]DefaultPath=\WinXP...in TXTSETUP.SIF, but I can't find the equivalent functionality in Windows 7's install process. I have a similar problem with the "Program Files" directories. In XP's setup I was able to alter those using:[Unattended]ProgramFilesDir="\Local"CommonProgramFilesDir="\Local\Common Files"...in WINNT.SIF, but again, I can't find the equivalent functionality in Windows 7's install process. At least with the latter you can copy them, edit the registry and then delete the orignals. Not exactly an option with the system directory though.My other avenue of enquiry is to make the changes into the WIM directly - rename the folders there and update the registry hives with the updated paths rather than trying to script the changes. The main hiccup I foresee is the bootloader probably generating the initial listing with the default path rather than looking up anything in the registry...anyone tried this already?I know I could just hard link the names I want to the directories default names and then hide the default directories, but I do a lot of system-level work, so running with hidden files & directories isn't really an option for me.
jaclaz Posted January 23, 2014 Posted January 23, 2014 Possibly some useful info in this thread:http://www.msfn.org/board/topic/170677-make-profile-folders-a-subfolder/jaclaz
JFX Posted January 23, 2014 Posted January 23, 2014 You can't change the Windows folder path since Vista.Doing it manually will only break your windows installation.
mrjrt Posted February 2, 2014 Author Posted February 2, 2014 Well, I gave up on my attempt (covered in another thread) to make this all configurable using custom autounattend.xml sections and piggybacking off setup.exe (couldn't suppress offline setup's reboot to give it time to do its thing), and decided to go back to modifying the install image directly (dirs and registry). The Program Files twins are quite happy in their new locations, and I've just finished up modifying the system and profiles dirs. I suspect if there's a problem it'll be with the system dir...but given WinPE's happy running from X:\Windows, I have hope it'll work......but that fateful install can wait until tomorrow.
mrjrt Posted February 12, 2014 Author Posted February 12, 2014 Weeeell, seems I've had some partial luck with my experiments that I figured I should share with people on the off-chance they come in useful. I don't expect anyone to consider this a good idea - but I always take being told you can't do something you used to be able to do as a challenge - hence why I stuck at it Basically, Windows quite happily supports running from a directory with any name, as I thought.What fails however is dism.exe and dismhost.exe - these seem to have some horrible bugs forcing you to have a C:\Windows directory. dism.exe has a parameter that lets you specify the windows directory, but in my tests it seems to ignore this. I used my shim to rewrite the command line args being passed to the correct ones and some DISM functionality doesn't even try to use it - it just goes straight for C:\Windows. I tested this using ProcessMonitor with which I watched what was happening during the installation.My set up was preparing my image with a renamed directory and a pre-edited offline registry (as mentioned before, ideally I want to transform a clean image dynamically so it's configurable - but this test is a proof of concept) - the first bit of setup copies this across fine. Setup then tries to fix up the offline registry - but annoyingly does so by - you guessed it - explicitly loading the hives from "c:\Windows\System32\config\". Workaround there is to add a junction back to the desired location and this bit then completes fine. The final phase is to install all the packages etc. and this is where dism's bugs come to the fore - despite the shim you still get the occasional access via C:\Windows - minimal, but still there.Right at the very end however another bug pops up - "CBS", whatever it is, has a bug with paths - my desired path here is "C:\SBin\x86_64-Win64" - however this bit tries "C:\x86_64-Win64". Workaround here is another temporary junction and that gets you past it.I've just let it finish downloading and installing all the updates and I now have a fully working up to date system with my system root in a non-standard location.
jaclaz Posted February 12, 2014 Posted February 12, 2014 Very good. If and when you will have time it would be nice if you could post a more detailed list of the steps involved, which I am sure would be very useful to those wishing to install to "non-C:\Windows" jaclaz
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now