Jump to content

vista'izing*cough*linuxizing...winxp folder structure.


Leeoniya

Recommended Posts

In my travels, I came upon this article:

http://derekslager.com/blog/posts/2007/03/...ture-on-xp.ashx

This got me thinking...would it be possible to rework the XP install source to actually have a near-vista-identical folder structure. Rather than creating junctions to have shorter names, eg "users" instead of "documents and settings", have xp actually use a "users" directory and create a "documents and settings" junction point instead, like vista?

through the procedure description it seems like redirection of documents and settings is a couple of reg tweaks and on initial install, it should be a simple registry hive tweak assuming the install process uses environment variables rather than absolute paths?...but even that can be remedied by a search and replace inside the hive?

anyone?

thanks,

Leon

Link to comment
Share on other sites


Should be just a matter of changing the following in winnt.sif

[GuiUnattended]
ProfilesDir="C:\Documents and Settings\"

to

[GuiUnattended]
ProfilesDir="C:\Users\"

http://unattended.msfn.org/unattended.xp/view/web/19/

any properly coded install program should install stuff that would normally go in c:\Documents and Settings to c:\Users

I dont know the variables to remove all the 'My 's from the pictures,documents, etc but you can kiss 'My Computer' goodbye

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}]
@="Computer"
"LocalizedString"=hex(2):43,00,6f,00,6d,00,70,00,75,00,74,00,65,00,72,00,00,00

Edited by geek
Link to comment
Share on other sites

I used a couple of entries in HIVEFIX.INF (you can use the appropriate HIVE*.INF files), to do this on setup, even under 2k.

; Hivesft.inf [addreg]
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList","ProfilesDirectory",0x00020002,"%DEFAULT_PROFILES_DIR%"
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList","AllUsersProfile",0x00000002,"%ALL_USERS%"
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList","DefaultUserProfile",0x00000002,"%DEFAULT_USER%"

; Shell Folders (HiveDef.inf)
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","AppData",0x00020002,"%U_SHELL_FOLDERS_APPDATA%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Desktop",0x00020002,"%U_SHELL_FOLDERS_DESKTOP%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Favorites",0x00020002,"%U_SHELL_FOLDERS_FAVORITES%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","NetHood",0x00020002,"%U_SHELL_FOLDERS_NETHOOD%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Personal",0x00020000,"%U_SHELL_FOLDERS_PERSONAL%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","PrintHood",0x00020002,"%U_SHELL_FOLDERS_PRINTHOOD%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Programs",0x00020002,"%U_SHELL_FOLDERS_PROGRAMS%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Recent",0x00020002,"%U_SHELL_FOLDERS_RECENT%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","SendTo",0x00020002,"%U_SHELL_FOLDERS_SENDTO%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Start Menu",0x00020002,"%U_SHELL_FOLDERS_START_MENU%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Startup",0x00020002,"%U_SHELL_FOLDERS_STARTUP%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Templates",0x00020002,"%U_SHELL_FOLDERS_TEMPLATES%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Cookies",0x00020000,"%U_SHELL_FOLDERS_COOKIES%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","My Pictures",0x00020000,"%U_SHELL_FOLDERS_MYPICTURES%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Local Settings",0x00020000,"%U_SHELL_FOLDERS_LOCAL_SETTINGS%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Local AppData",0x00020000,"%U_SHELL_FOLDERS_LOCAL_APPDATA%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Cache",0x00020000,"%U_SHELL_FOLDERS_CACHE%"
HKCU,"Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","History",0x00020000,"%U_SHELL_FOLDERS_HISTORY%"



; [strings]

; Shell Folders
DEFAULT_PROFILES_DIR="%SystemDrive%\USERS"
DEFAULT_USER="Default"
ALL_USERS="Public"

TEMP_DIR="%USERPROFILE%\Temp"

U_SHELL_FOLDERS_APPDATA="%USERPROFILE%\AppData"
U_SHELL_FOLDERS_DESKTOP="%USERPROFILE%\W\Desktop"
U_SHELL_FOLDERS_FAVORITES="%USERPROFILE%\Favorites"
U_SHELL_FOLDERS_NETHOOD="%USERPROFILE%\NetHood"
U_SHELL_FOLDERS_PERSONAL="%USERPROFILE%\Personal"
U_SHELL_FOLDERS_PRINTHOOD="%USERPROFILE%\PrintHood"
U_SHELL_FOLDERS_PROGRAMS="%USERPROFILE%\Start Menu\Programs"
U_SHELL_FOLDERS_RECENT="%USERPROFILE%\Recent"
U_SHELL_FOLDERS_SENDTO="%USERPROFILE%\SendTo"
U_SHELL_FOLDERS_START_MENU="%USERPROFILE%\Start Menu"
U_SHELL_FOLDERS_STARTUP="%USERPROFILE%\Start Menu\Programs\Startup"
U_SHELL_FOLDERS_TEMPLATES="%USERPROFILE%\Templates"
U_SHELL_FOLDERS_COOKIES="%USERPROFILE%\Cookies"
U_SHELL_FOLDERS_MYPICTURES="%USERPROFILE%\Personal\Pictures"
U_SHELL_FOLDERS_LOCAL_SETTINGS="%USERPROFILE%\Local"
U_SHELL_FOLDERS_LOCAL_APPDATA="%USERPROFILE%\AppData"
U_SHELL_FOLDERS_CACHE="%USERPROFILE%\Temporary Internet Files"
U_SHELL_FOLDERS_HISTORY="%USERPROFILE%\History"

This makes it more vista-like, by making the default user = \users\default, and all-users as \users\public, as it is in Vista.

Note that some proggies are set up to create "Program Files" from their own inf, so it is less well to move this file.

Also note:

In windows 2k/xp, you can't change the folder parents for files in shell_folders. For example, you might had wanted to put all of the ,lnk files under a common folder (eg \lnk\desktop, \lnk\Start Menu, &c). You could had then created a desktop icon to allow better link management, but this does not install properly. "Halt and Catch Fire" is the appropriate idiom.

The windows i am using now, is a 2k with these default settings, and a few others.

You can use the U_Shell_folder settings, to eliminate most space (and MY_...) from the system, although MSIE requires the name Temporary Internet Files, and Start-Menu seems to require a space (because it is set up elsewhere too.) Explorer will continue to use "My Computer", &c, even if the directories don't contain My..

The temp directory also needs to be re-affermed later on as well. Some INF changes this to the default location.

You can also set the time-zone and international settings here too, especially if the international settings are not the default ones.

Link to comment
Share on other sites

how to you put to to use your .inf file? can this only be done during a system install? What changes would i make to my install disk to create this setup. Any negative effects for creating these settings?

Edited by cumminbk
Link to comment
Share on other sites

I normally install these by a special file HIFEFIX.INF. Search for 'hivefix' or use www.msfn.org/board/lofiversion/index.php/t84600.html for full example and construction. You could also add the stuff directly to HIVESOFT.INF and HIVEDEF.INF as well. These settings take effect after the files in dosnet.inf and $oem$ are copied, but before the first reboot. Since the files typically live in $win_nt$.~

Any new files to be added must be added via dosnet.inf (which the character-mode setup uses to copy files) and via txtsetup.sif (gui-mode). The first file gives examples of this. You see also that i activate hivefix.inf after the other inf files run. Hivefix and the other .inf modify the default registry (including default-user) before the first gui is created or the user or home directories are set up.

There are few known side effects, but mostly these are corrected (reversed) here. Most of these are caused by later .INF files overwriting the default settings. Directories known to be affected are PROGRAM FILES, APPLICATION DATA, %TEMP% and a few others. These can in part be corrected later in the install process (esp %TEMP%).

You can not change the structure of the tree, just the names. For example, you can't group all of the .LNK files into a directory like %USER%\D\... What you could had done, is have desktop, sendto, and start-menu and various quick-launch taskbars under the same folder, and then manage these from a common shortcut to %USER%\D\. This does not work.

If you change the default user location (ie to \users\default), then programs that expect %profilesdir%\Default User, then some proggies might groan. This should only affect installs, but they should be useing a different location (allusers).

Apart from this, it is a little safer because things are not in the default locations, and programs hard-coded for particular directories may fail.

Link to comment
Share on other sites

but anything that breaks can be remedied with appropriate junction points....just make a cmd script that generates all of them using this CLI proggie. http://www.microsoft.com/technet/sysintern...k/Junction.mspx running it at t-13 should allow you to use environment variables and never have to change it again, even if you decide to change the directory names during txtmode.

the only issue i foresee is backup software that doesnt check for reparse points. It is important to note that all it needs to do is "check" for them.

through explorer's detail view a junction will have its target folder in the "reference" column, which isnt on by default. through the CLI, a simple DIR command will show you that it's a <JUNCTION>. Otherwise a full disk image should work fine i believe, and if you do specific directory backups, just watch out and exclude nested junctions.

Leon

Edited by Leeoniya
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...