Jump to content

Make Profile folder(s) a subfolder


Dogway

Recommended Posts

I only wondered how it is possible that nobody since WindowsXP tried to do what I explained here. And if I had to ask, it was this place foremost, although I also asked in wincert. I don't know of any better place for people who might have tried this.

I can go testing different unattended procedures (moving mountains) just to find that it might work (I fear not) or plainly not, and then come here at point 0 and ask again, why this? is there a workaround? So much to lose that it really justifies the opening of this thread.
Hopefully you now get my point, forum threads are precisely for that, to don't reinvent the wheel.

Link to comment
Share on other sites


I only wondered how it is possible that nobody since WindowsXP tried to do what I explained here.

Lack of imagination/fantasy? :unsure:

Deviated research efforts/investments?

You know like ;):

http://www.msfn.org/board/topic/170503-why-not-invent-a-flying-car-instead-of-one-manned-spaceship/

Hopefully you now get my point, forum threads are precisely for that, to don't reinvent the wheel.

Actually (no offence whatever intended :)) it seems to me like you are trying to reinvent the wheel for "futile" reasons (just having a "cleaner" folder structure).

It may be possible or it may be not, but since this same exact "new wheel design" has not been seemingly already invented (or not enough research efforts have been made in that), you'll have to start experimenting on your own and if not wholly "invent" it, adapt prior art to it (if possible).

jaclaz

Link to comment
Share on other sites

@Dogway, I have no idea at all whether what I'm going to say will work at all at the unattended stage or not, but it is your problem so as jaclaz has pointed out your best option is probably to try it and see. After all, while I think you absolutely did the best thing and asked ahead of time to save yourself having to reinvent the wheel, apparently either no one else has tried it, or those who have haven't seen your posts. You can't be mad about that, it's just the luck of the draw. When I have reassigned the folders you are talking about to another drive in the past, I did it more "manually" and I didn't care that it wasn't unattended since I was only doing my own system install. Here was one of my very early efforts, and I was not trying to have the same folder structure you were, but it might be able to be modified. I haven't used it in a couple of years, so you will just have to experiment with it if you want.

If for whatever reason it won't allow you to create the nested structure you want directly, then I would try subst. The way I understand it, the OS will then think that it is placing the folders at the root of the drive, and it will be for the assigned drive letter, but if it works and the new drive letter is actually assigned to "D:\Win7Settings\", then you will get the neat folder structure on D:\ that you are looking for. Again, I'd not sure it will work during unattended, you will have to experiment.

Good luck.

Cheers and Regards

Link to comment
Share on other sites

jaclaz: I think you are losing the point, on the long term having 3 or 4 less folders on your work drive to look for makes a difference. If you think folder (or general) organization never brings nothing to the table I have to strongly disagree with you, because organization is the base for smooth and correct work. Now if you think it's only an "aesthetic" matter, we surely are talking 2 different things here.

bphlpt: thanks for input, precisely because it's my own system I want to be careful to do things correct, not only for this install but also for the years to come. Guess that if you didn't have any problem with that method then I shouldn't worry too much, but I'm going to research both, because the hard way might be a little bit too hard so I will have yours as a fallback. You run the script at the (unavoidable) account creation screen right? entering audit mode with ctrl+shift+f3?
The script seems to be down on that page.
The hard way is to do by hand what the unattended is trying to do, but bypassing all the screens and going straight to the point, just do the **** thing manually. I guess steps are around, so I am not going to bother asking here about that. If that fails I will try to use subst. Thanks a lot.

Link to comment
Share on other sites

Sorry about the dead link to the missing script, but that post was 3 1/2 years ago. :) I was "customizing" my OS then for about a half a year or so, but I haven't done it that way since, so forgive me if I no longer remember some of the details. I didn't use audit mode because I didn't know what that was back then. And I didn't use unattended, I did everything manually, but there weren't as many hotfixes etc back then so it wasn't as big a deal as it is now. I honestly don't remember for sure, but I either ran the script at account creation, or I used Shift+F10 to get a command line during setup and ran the script that way. I think the latter, but I don't remember how I knew exactly when to run the script. Sorry. I believe it might even work OK if run immediately after installing the OS, but you definitely want to do it before any apps are installed and before anything is installed to the profiles because nothing is moved from the original location to the new, just the location definitions are changed, and the folders in the original locations are deleted. And no searches are made in the registry for any reference at all of anything that used the original locations. So do it as early as you can, but it has to be after the current user hive is created in the registry.

I'll reprint the files here, along with some of the notes from my thread at Ryan's so you don't have to look back and forth, but you'll just have to play with them so see if they work for you. It's just been too long since I've used them for me to be much more help than that. They did work for me, no problems that I recall, but you might also want to add some hard links in the "Standard" places to handle those few programs that are hard coded to use those locations and do not pay attention to the registry entries like they should. Unfortunately I think there were/are some such misbehaving, poorly written apps, but I can't name them off the top of my head, if they still exist. You could also do a copy of anything that was in the original locations before you turn them into hard links. The more I write the more I'm sure you'll think "that sure is a lot of trouble" and it was, which is why I quit doing it. You might find or figure out a better more reliable way. I still like the concept for organization, ease in backup, might help in SSD life for profiles to not be on them etc.

@Dogway, I really think you should be able to make this work the way you want to. Look carefully below at the differences I used to assign:

"UserProfile\Downloads" -> D:\Downloads
vs
"UserProfile\Music" -> D:\Media\Music

So I was able to nest at least some of the folders and I don't know why you can't do that to all of them, unless it's just one of MS's "gotchas". You will just have to try it.

Make whatever use you wish out of this. I HAVE NOT TESTED THIS OR USED THIS METHOD IN THREE YEARS. Anyone who can improve this, please post. I'm sure there are others that would make use of it.

From Ryan's (2010-07-12):

When you restore your Windows 7 image (either 32 or 64-bit) to a new computer, and create the new user account(s), do you have to bring up the properties of each user's data folders (Downloads, My Documents, My Music, My Pictures, My Videos, et cetera) and tell each one to move to a different path? Do you wish there were a way to move all personal data folders for all users to another location?

I'm VERY new to playing with Windows 7, but I've come up with something that works for me to do just what you were looking for.

This is a Command/Reg file combination that allows you to:

-----Change label of C: -> MyHD
-----Rename Current User Desktop Favorite -> Desk
-----Rename Current User libraries:
----------Documents -> Docs
----------Music -> Music
----------Pictures -> Pics
----------Videos -> Vids
----- Move Profiles -> D:
----------"ProfilesDirectory"="D:\Users"
----------"Public"="D:\Users\Public"
----- Move/Rename the following Public folders:
----------"Public\Downloads" -> D:\Users\Public\PubDown
----------"Public\Desktop" -> D:\Users\Public\PubDesk
----------"Public\Documents" -> D:\Users\Public\PubDocs
----------"Public\Music" -> D:\Users\Public\Media\PubMusic
----------"Public\Pictures" -> D:\Users\Public\Media\PubPics
----------"Public\Videos" -> D:\Users\Public\Media\PubVids
----- Move/Rename New User folders to fixed locations on D: by changing values for Default User
----------"UserProfile\Downloads" -> D:\Downloads
----------"UserProfile\Desktop" -> D:\Desk
----------"UserProfile\Favorites" -> D:\Favs
----------"UserProfile\Documents" -> D:\Docs
----------"UserProfile\Music" -> D:\Media\Music
----------"UserProfile\Pictures" -> D:\Media\Pics
----------"UserProfile\Videos" -> D:\Media\Vids
----- Rename Current User "Computer" -> "MyComp"
----- Rename Current User "Favorites" -> "Favs"
----- Rename Current User "Recycle Bin" -> "Trash"
----- Move/Rename the following Current User folders:
----------"UserProfile\Downloads" -> D:\Downloads
----------"UserProfile\Desktop" -> D:\Desk
----------"UserProfile\Favorites" -> D:\Favs
----------"UserProfile\Documents" -> D:\Docs
----------"UserProfile\Music" -> D:\Media\Music
----------"UserProfile\Pictures" -> D:\Media\Pics
----------"UserProfile\Videos" -> D:\Media\Vids
----- Remove Current User Favorites from Windows Explorer window
----- Remove Current User Libraries from Windows Explorer window
----- Delete no longer used User Profile folders

This is obviously set up for my own personal preferences, your's are probably different. Use these files as a model and edit ALL files as you see fit with your own preferences. All the usual warnings about editing the registry, backup your registry and data, etc. apply.

Running the Command file will call the Reg files automatically. This should be run during the account setup stage or immediately after initial install for best results, but it might can be run later. This has only been tested with Windows 7 Ultimate x86.

I would really appreciate it if anyone could give me some feedback on this and let me know of anything I did wrong or ways to improve this.



Profiles.cmd

echo offREM ;-----Changes label of C: to MyHDlabel c:MyHDREM ;-----Rename Current User Desktop Favorite -> Deskren %USERPROFILE%\Links\Desktop.lnk Desk.lnkREM ;-----Rename Current User Library files :REM ;Documents -> DocsREM ;Music -> MusicREM ;Pictures -> PicsREM ;Videos -> Vidsren %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Libraries\Documents.library-ms Docs.library-msREM ren %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Libraries\Music.library-ms Music.library-msren %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Libraries\Pictures.library-ms Pics.library-msren %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Libraries\Videos.library-ms Vids.library-msSTART /WAIT REGEDIT /S Profiles.regSTART /WAIT REGEDIT /S ProfilesPublicFolders.regSTART /WAIT REGEDIT /S ProfilesDefaultUser.regSTART /WAIT REGEDIT /S ProfilesCurrentFoldersLibraries.regSTART /WAIT ProfilesCleanProfile.cmdREM ;-----Rename Current User Library files (AGAIN - In case it didn't "Take") :REM ;Documents -> DocsREM ;Music -> MusicREM ;Pictures -> PicsREM ;Videos -> Vidsren %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Libraries\Documents.library-ms Docs.library-msREM ren %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Libraries\Music.library-ms Music.library-msren %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Libraries\Pictures.library-ms Pics.library-msren %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Libraries\Videos.library-ms Vids.library-msexit



Profiles.reg

Windows Registry Editor Version 5.00;===============================================================================;     Profiles Settings;===============================================================================; ----- Move Profiles to D: -----;       "Default"="D:\Users\Default";       "ProfilesDirectory"="D:\Users";       "Public"="D:\Users\Public"[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList]"Default"=hex(2):44,00,3a,00,5c,00,55,00,73,00,65,00,72,00,73,00,5c,00,44,00,\  65,00,66,00,61,00,75,00,6c,00,74,00,00,00"ProfilesDirectory"=hex(2):44,00,3a,00,5c,00,55,00,73,00,65,00,72,00,73,00,00,\  00"Public"=hex(2):44,00,3a,00,5c,00,55,00,73,00,65,00,72,00,73,00,5c,00,50,00,75,\  00,62,00,6c,00,69,00,63,00,00,00;===============================================================================;===============================================================================



ProfilesPublicFolders.reg

Windows Registry Editor Version 5.00;===============================================================================;     Public Settings;===============================================================================; ----- Move/Rename the following Public folders: -----;       "Public\Downloads" -> D:\Users\Public\PubDown;       "Public\Desktop" -> D:\Users\Public\PubDesk;       "Public\Documents" -> D:\Users\Public\PubDocs;       "Public\Music" -> D:\Users\Public\Media\PubMusic;       "Public\Pictures" -> D:\Users\Public\Media\PubPics;       "Public\Videos" -> D:\Users\Public\Media\PubVids[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]"{3D644C9B-1FB8-4f30-9B45-F670235F79C0}"=hex(2):44,00,3a,00,5c,00,55,00,73,00,\  65,00,72,00,73,00,5c,00,50,00,75,00,62,00,6c,00,69,00,63,00,5c,00,50,00,75,\  00,62,00,44,00,6f,00,77,00,6e,00,00,00"Common Desktop"=hex(2):44,00,3a,00,5c,00,55,00,73,00,65,00,72,00,73,00,5c,00,\  50,00,75,00,62,00,6c,00,69,00,63,00,5c,00,50,00,75,00,62,00,44,00,65,00,73,\  00,6b,00,00,00"Common Documents"=hex(2):44,00,3a,00,5c,00,55,00,73,00,65,00,72,00,73,00,5c,\  00,50,00,75,00,62,00,6c,00,69,00,63,00,5c,00,50,00,75,00,62,00,44,00,6f,00,\  63,00,73,00,00,00"CommonMusic"=hex(2):44,00,3a,00,5c,00,55,00,73,00,65,00,72,00,73,00,5c,00,50,\  00,75,00,62,00,6c,00,69,00,63,00,5c,00,4d,00,65,00,64,00,69,00,61,00,5c,00,\  50,00,75,00,62,00,4d,00,75,00,73,00,69,00,63,00,00,00"CommonPictures"=hex(2):44,00,3a,00,5c,00,55,00,73,00,65,00,72,00,73,00,5c,00,\  50,00,75,00,62,00,6c,00,69,00,63,00,5c,00,4d,00,65,00,64,00,69,00,61,00,5c,\  00,50,00,75,00,62,00,50,00,69,00,63,00,73,00,00,00"CommonVideo"=hex(2):44,00,3a,00,5c,00,55,00,73,00,65,00,72,00,73,00,5c,00,50,\  00,75,00,62,00,6c,00,69,00,63,00,5c,00,4d,00,65,00,64,00,69,00,61,00,5c,00,\  50,00,75,00,62,00,56,00,69,00,64,00,73,00,00,00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]"Common Desktop"="D:\\Users\\Public\\PubDesk""Common Documents"="D:\\Users\\Public\\PubDocs""CommonMusic"="D:\\Users\\Public\\Media\\PubMusic""CommonPictures"="D:\\Users\\Public\\Media\\PubPics""CommonVideo"="D:\\Users\\Public\\Media\\PubVids"; ----- Change Media Center RecordPath -> D:\Users\Public\Media\PubRecordedTV\ -----[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\Recording]"RecordPath"="D:\\Users\\Public\\Media\\PubRecordedTV\\";===============================================================================;===============================================================================



ProfilesDefaultUser.reg

Windows Registry Editor Version 5.00;===============================================================================;     Default User Settings - Will apply to all New Users;===============================================================================; ----- Move/Rename New User folders to fixed locations on D: by changing values for Default User -----;       "UserProfile\Downloads" -> D:\Downloads;       "UserProfile\Desktop" -> D:\Desk;       "UserProfile\Favorites" -> D:\Favs;       "UserProfile\Documents" -> D:\Docs;       "UserProfile\Music" -> D:\Media\Music;       "UserProfile\Pictures" -> D:\Media\Pics;       "UserProfile\Videos" -> D:\Media\Vids[HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]"{374DE290-123F-4565-9164-39C4925E467B}"=hex(2):44,00,3a,00,5c,00,44,00,6f,00,\  77,00,6e,00,6c,00,6f,00,61,00,64,00,73,00,00,00"Desktop"=hex(2):44,00,3a,00,5c,00,44,00,65,00,73,00,6b,00,00,00"Favorites"=hex(2):44,00,3a,00,5c,00,46,00,61,00,76,00,73,00,00,00"Personal"=hex(2):44,00,3a,00,5c,00,44,00,6f,00,63,00,73,00,00,00"My Music"=hex(2):44,00,3a,00,5c,00,4d,00,65,00,64,00,69,00,61,00,5c,00,4d,\  00,75,00,73,00,69,00,63,00,00,00"My Pictures"=hex(2):44,00,3a,00,5c,00,4d,00,65,00,64,00,69,00,61,00,5c,00,\  50,00,69,00,63,00,73,00,00,00"My Video"=hex(2):44,00,3a,00,5c,00,4d,00,65,00,64,00,69,00,61,00,5c,00,56,\  00,69,00,64,00,73,00,00,00[HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]"{374DE290-123F-4565-9164-39C4925E467B}"="D:\\Downloads""Desktop"="D:\\Desk""Favorites"="D:\\Favs""Personal"="D:\\Docs""My Music"="D:\\Media\\Music""My Pictures"="D:\\Media\\Pics""My Video"="D:\\Media\\Vids";===============================================================================;===============================================================================



ProfilesCurrentFoldersLibraries.reg

Windows Registry Editor Version 5.00;===============================================================================;     Current User Settings;===============================================================================; ----- Change name of Current User "Computer" -> "MyComp" -----[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}]@="MyComp"; ----- Change name of Current User "Favorites" -> "Favs" -----[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{323CA680-C24D-4099-B94D-446DD2D7249E}]@="Favs"; ----- Change name of Current User "Recycle Bin" -> "Trash" -----[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}]@="Trash"; ----- Move/Rename the following Current User folders: -----;       "UserProfile\Downloads" -> D:\Downloads;       "UserProfile\Desktop" -> D:\Desk;       "UserProfile\Favorites" -> D:\Favs;       "UserProfile\Documents" -> D:\Docs;       "UserProfile\Music" -> D:\Media\Music;       "UserProfile\Pictures" -> D:\Media\Pics;       "UserProfile\Videos" -> D:\Media\Vids;; ----- Change names of Current User libraries: -----;       "Documents" -> Docs;       "Music" -> Music;       "Pictures" -> Pics;       "Videos" -> Vids; ----- NOTE: This will NOT change the name of the library itself, only correct the registry entry.; ----- You also need to change the library file name using command line instructions[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]"{374DE290-123F-4565-9164-39C4925E467B}"=hex(2):44,00,3a,00,5c,00,44,00,6f,00,\  77,00,6e,00,6c,00,6f,00,61,00,64,00,73,00,00,00"Desktop"=hex(2):44,00,3a,00,5c,00,44,00,65,00,73,00,6b,00,00,00"Favorites"=hex(2):44,00,3a,00,5c,00,46,00,61,00,76,00,73,00,00,00"Personal"=hex(2):44,00,3a,00,5c,00,44,00,6f,00,63,00,73,00,00,00"My Music"=hex(2):44,00,3a,00,5c,00,4d,00,65,00,64,00,69,00,61,00,5c,00,4d,\  00,75,00,73,00,69,00,63,00,00,00"My Pictures"=hex(2):44,00,3a,00,5c,00,4d,00,65,00,64,00,69,00,61,00,5c,00,\  50,00,69,00,63,00,73,00,00,00"My Video"=hex(2):44,00,3a,00,5c,00,4d,00,65,00,64,00,69,00,61,00,5c,00,56,\  00,69,00,64,00,73,00,00,00"{7B0DB17D-9CD2-4A93-9733-46CC89022E7C}"=hex(2):25,00,55,00,53,00,45,\  00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,00,45,00,25,00,5c,00,41,00,70,00,\  70,00,44,00,61,00,74,00,61,00,5c,00,52,00,6f,00,61,00,6d,00,69,00,6e,00,67,\  00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,5c,00,57,00,\  69,00,6e,00,64,00,6f,00,77,00,73,00,5c,00,4c,00,69,00,62,00,72,00,61,00,72,\  00,69,00,65,00,73,00,5c,00,44,00,6f,00,63,00,73,00,2e,00,6c,00,69,00,62,00,\  72,00,61,00,72,00,79,00,2d,00,6d,00,73,00,00,00"{2112AB0A-C86A-4FFE-A368-0DE96E47012E}"=hex(2):25,00,55,00,53,00,45,\  00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,00,45,00,25,00,5c,00,41,00,70,00,\  70,00,44,00,61,00,74,00,61,00,5c,00,52,00,6f,00,61,00,6d,00,69,00,6e,00,67,\  00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,5c,00,57,00,\  69,00,6e,00,64,00,6f,00,77,00,73,00,5c,00,4c,00,69,00,62,00,72,00,61,00,72,\  00,69,00,65,00,73,00,5c,00,4d,00,75,00,73,00,69,00,63,00,2e,00,6c,00,69,00,\  62,00,72,00,61,00,72,00,79,00,2d,00,6d,00,73,00,00,00"{A990AE9F-A03B-4E80-94BC-9912D7504104}"=hex(2):25,00,55,00,53,00,45,00\  00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,00,45,00,25,00,5c,00,41,00,70,00,\  70,00,44,00,61,00,74,00,61,00,5c,00,52,00,6f,00,61,00,6d,00,69,00,6e,00,67,\  00,5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,5c,00,57,00,\  69,00,6e,00,64,00,6f,00,77,00,73,00,5c,00,4c,00,69,00,62,00,72,00,61,00,72,\  00,69,00,65,00,73,00,5c,00,50,00,69,00,63,00,73,00,2e,00,6c,00,69,00,62,00,\  72,00,61,00,72,00,79,00,2d,00,6d,00,73,00,00,00"{491E922F-5643-4AF4-A7EB-4E7A138D8174}"=hex(2):25,00,55,00,53,00,45,00,\  52,00,50,00,52,00,4f,00,46,00,49,00,4c,00,45,00,25,00,5c,00,41,00,70,00,70,\  00,44,00,61,00,74,00,61,00,5c,00,52,00,6f,00,61,00,6d,00,69,00,6e,00,67,00,\  5c,00,4d,00,69,00,63,00,72,00,6f,00,73,00,6f,00,66,00,74,00,5c,00,57,00,69,\  00,6e,00,64,00,6f,00,77,00,73,00,5c,00,4c,00,69,00,62,00,72,00,61,00,72,00,\  69,00,65,00,73,00,5c,00,56,00,69,00,64,00,73,00,2e,00,6c,00,69,00,62,00,72,\  00,61,00,72,00,79,00,2d,00,6d,00,73,00,00,00; ----- Remove Current User Favorites from Windows Explorer Window (Assumes you ALREADY HAVE Ownership of Registry Key) -----[HKEY_CLASSES_ROOT\CLSID\{323CA680-C24D-4099-B94D-446DD2D7249E}\ShellFolder]"Attributes"=dword:a9400100"PinToNameSpaceTree"=""; ----- Remove Current User Libraries from Windows Explorer window (Assumes you ALREADY HAVE Ownership of Registry Key) -----[HKEY_CLASSES_ROOT\CLSID\{031E4825-7B94-4dc3-B131-E946B44C8DD5}\ShellFolder]"Attributes"=dword:b090010d"PinToNameSpaceTree"="";===============================================================================;===============================================================================



ProfilesCleanProfile.cmd

echo offREM ;-----Delete no longer used User Profile Foldersrd /S /Q %USERPROFILE%\Documentsrd /S /Q %USERPROFILE%\Downloadsrd /S /Q %USERPROFILE%\Favoritesrd /S /Q %USERPROFILE%\Musicrd /S /Q %USERPROFILE%\Picturesrd /S /Q %USERPROFILE%\Videosrd /S /Q C:\Users\Default\Desktoprd /S /Q C:\Users\Default\Documentsrd /S /Q C:\Users\Default\Downloadsrd /S /Q C:\Users\Default\Favoritesrd /S /Q C:\Users\Default\Musicrd /S /Q C:\Users\Default\Picturesrd /S /Q C:\Users\Default\Videosrd /S /Q C:\Users\Publicexit



Suggestion for improvement from vmanda (2011-03-04)

@bphlpt: Just readed yours post. I thing that your script will be even more usefull if users can choose itself folders structure.
This can be done if you will switch all script to command script only. Reasons to modify your script to command script only:
1. REG_EXPAND_SZ registry keys will appear as clear txt, so peoples can modify your script by preferences.
For example:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
"{3D644C9B-1FB8-4f30-9B45-F670235F79C0}"=hex(2):44,00,3a,00,5c,00,55,00,73,00,\
65,00,72,00,73,00,5c,00,50,00,75,00,62,00,6c,00,69,00,63,00,5c,00,50,00,75,\
00,62,00,44,00,6f,00,77,00,6e,00,00,00

became

reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /f /v "{3D644C9B-1FB8-4f30-9B45-F670235F79C0}" /t REG_EXPAND_SZ /d "D:\Users\Public\PubDown"

so, if you add folders paths strings at top of script by using SET commands this will make script easy to be edited by users itself.

2. The script will be a single file.

This command line tool, reg2cmd, let you convert registry files to cmd script.
Usage:
 reg2cmd profiles.reg profiles_1.cmd
Speaking of users preferences, for example, i wish a folder structure more likely old "Documents and Settings" from XP,
inplace of "Users" from Vista/Seven.

Anyway, many thanks for finding the way to change this settings.



Good luck!

Cheers and Regards

Edited by bphlpt
Link to comment
Share on other sites

jaclaz: I think you are losing the point, on the long term having 3 or 4 less folders on your work drive to look for makes a difference. If you think folder (or general) organization never brings nothing to the table I have to strongly disagree with you, because organization is the base for smooth and correct work. Now if you think it's only an "aesthetic" matter, we surely are talking 2 different things here.

No, I see the point (the goal) alright :yes:, I still find it (personally) as something "futile", but that is just my opinion, when "balancing" the hypothetical advantage against the known disadvantages (issues with updates) and the unknown but probable ones (other possible issues in the "normal" working of the OS) of the method/path you chose to get to that goal (which we don't yet know if possible at all).

So, once set that straight (compare also with the "But then, why?" in my signature) we can see if there are simpler ways to reach that goal.

As an example, IF your issue is about having in Explorer one less folder, set it to hidden/system (and set Explorer options accordingly), then make a junction to it in the subfolder, something *like*:

http://www.howtogeek.com/forum/topic/how-to-hide-documents-and-settings-folderjunction

jaclaz

Link to comment
Share on other sites

I'm "buying time", I don't want to do this lightly.
I want a few things to get done (personal projects) before this in case I fail and have not access to PC anymore, yes, I'm always so pesimistic, but it's good for prevention. Probably next week I get my hands on it.
Sorry I didn't reply, I didn't realise your edit.

I'm first going to try to get to the core file where this path is written in stone and edit it, I don't remember which (probably jaclaz knows better), TXTSETUP.SIF, or whatever it is, I will do the research next week, switch back to my old computer and test that on VM. If it keeps changing path to root I try stub and if not your try. I really don't want to reinstall the OS because I also need to pay attention as I'm building a Dual Boot at the same time.

For me the pain is these 2 weeks, then I will just need to read a custom made fool-proof readme so I don't need to remember anything (I don't trust forums lasting forever). And Win7 being my future XP as it seems, I really don't care to invest now what I will use in so many years forward.

Link to comment
Share on other sites

OK, I tried first with WinXP as a starting point, and it was easy. Just pointing the path inside winnt.sif. For reference:

[GuiUnattended]
ProfilesDir="D:\Profiles\Documents and Settings (XP)"

This actually works. I'm trying to find something similar to winnt.sif but for 7 however I only get references to the deploying tools, which when I got my hands onto them were nothing more than some tools to create an answer file like unattended.xml. This is similar to the XP unttended last_session.inf which was not working, so I wonder if there's anything more primitive than this unattended.xml file.

Edited by Dogway
Link to comment
Share on other sites

The UNATTEND.XML (or AUTOUNATTEND.XML" is the "new" WINNT.SIF. As "primitive" as it gets. BTW, WINNT.SIF is (ta-dah!) Deployment, so only the method changed from 2K/XP/2K3->Vista/7/8. ;)

Put on your Schoolboy Hat. You'll need it. I played all HECK just figuring out a Fully Unattended Win7 Install. Searched on TechNet for all of the Deployment documentation. TBH, I'm not sure you can change the location via the XML - maybe. :unsure: Google with

somestring "a quoted string" site:technet.microsoft.com

An example of what I found -

http://technet.microsoft.com/en-us/library/ff699026.aspx

Most still applies.

http://technet.microsoft.com/en-us/library/cc766245%28v=ws.10%29.aspx

Also still good. Simply look around.

Link to comment
Share on other sites

It's funny how on your first post, 2 weeks ago, it was like:

XP - Different (old) beast entirely.

When I actually had to only edit the winnt.sif file.

The problem now, and if you read my OP correctly, is that the XML answer file is not working, despite pointing the profile paths correctly.

So here is where similarities end. They might be both the most "primitive" ways to answer steps for an unattended install, and yet they differ on how the profile path is passed to the system. unattend.xml surely has more in common to last_session.inf than anything else. I really wonder if there is any more manual (but native, not actually changing paths) than this xml file (which I repeat, is not working).

edit: I might just be bumping into a dead end as is suggested in this thread (the guy wants unsucessfully to change the dir names), in which case I could try the subst program suggested by bphlpt, this is indeed doable, I'm thinking what might be the least painful way.

Edited by Dogway
Link to comment
Share on other sites

Let me see :unsure:.

According to your experiments:

  1. Windows XP uses WINNT.SIF for unattended settings and allows through it to move profiles to (say) "\Profiles\Documents and Settings (XP)".
  2. Windows 7 uses unattended.xml for unattended settings and DOES NOT allow through it to move profiles to (say) "\Profiles\Documents and Settings (7)".

I would say they are different beasts. :whistle:

jaclaz

Link to comment
Share on other sites

Does this help?

http://social.technet.microsoft.com/Forums/en-US/1ee706b8-46d3-4d20-a69f-433eb7c48563/windows-7-profilesdirectory-problem-with-unattended-instalation?forum=mdt

Specifics that "someone else" used to manage to get it to work -

http://cchipcookie.blogspot.com/2012/03/moving-profile-folder-to-different.html

Whether this would work -after- an XP Install, I have no clue.

Further info (in addition to link inside above link) -

http://technet.microsoft.com/en-us/library/ff715636.aspx

Found via "googling"

unattend "profilesdirectory"

Not necessarily OT, I found that for Fully Unattended from a Mounted ISO on USB with AUTOUNATTEND.XML on the ROOT (booted with Grub4DOS+Firadisk) that the settings for "DiskPart" would -not- silently complete (halted for input) unless the Target HDD had bean "cleaned". Bear in mind that the sole purpose of the old/new methods is (generally) either Office Deployment -or- OEM Deployment, in both cases (generally) using the "recommended" methods, including the use of a Prepped WIM via WinPE 1.x (old) / WinPE v2.x (new). Open the BOOT.WIM with 7-zip and you'll see both the WinPE and the WinRE (AFAICR, in that order). So it appears that -both- "old" and "new" are extremely picky in the "how-to".

Link to comment
Share on other sites

I would say they are different beasts. :whistle:

Tiny beast point 1 is. Only writing one line on winnt.sif, are you playing, trolling or what are you doing here? Do post some meat and no random non-sense.

submix8c, I come later after I do some further research. Thanks for help.

Link to comment
Share on other sites

I was only highlighting how till now the result of your experiments confirmed that Windows XP and Windows 7 behave differently, aka they are different beasts.

Till now you confirmed in practice that something that can be done in XP unattended cannot seemingly be done in 7, which was exactly submix8c's theory proposed two weeks ago.

jaclaz

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...