• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
Dogway

Make Profile folder(s) a subfolder

38 posts in this topic

I tried this with both XP and 7, and they are all automatically reverted back to root drive.

Windows7 specially creates a bunch of profile folders, and I want them all inside a folder on root D:, so I have them all nicely placed in just one location along the XP "Documents and Settings (XP)" (on Dual Boot). I'm indicating the paths for both through the unattended answer files.

I might be stating the obvious but is this mandatory, is there a reason for this, or a workaround? Thank you!

Edited by Dogway
0

Share this post


Link to post
Share on other sites

Bump, I'm highly interested on whether this is possible or not. It would be a bit lame in case it couldn't but we have seen worse things from microsoft.

I checked and Win7 creates 3 folders, Users, Documents and Settings (actually a placeholder), and ProgramData. With the XP profile folder it makes 4 folders of profiles on D: which is cumbersome.

0

Share this post


Link to post
Share on other sites

Won't work any other way.

Users is "old" Documents And Settings (a "junction point", not a "placeholder", but the "new way" pointer).

(That's Two of the Three.)

ProgramData -

http://answers.microsoft.com/en-us/windows/forum/windows_7-files/can-not-find-the-program-data-folder/bb22413e-7977-e011-8dfc-68b599b31bf5

(That's Three of Three)

XP - Different (old) beast entirely.

Now, if you start looking around in the "Users" folder you get to be more confused (more junctions).

I can open ALL of the "Users" sub-folders EXCEPT the "Default User" one. If I open "All Users" you'll notice some "looks like links" but they are not. These are also Junctions into the "ProgramData" Folder (see above link) - look at the structure of the two.

How you "did it" is all you'll be able to get. They will not "mix" and some of those "folders" are nothing more than Junctions and (almost) occupy no space.

HTH (cumbersome, yes - required to "work that way", also yes)

0

Share this post


Link to post
Share on other sites

@submix8c I don't think that Dogway is necessarily complaining about the new way that it works with multiple folders and some if not most of them being junction points. I think the only thing he wants to change is this:

I think he is getting:

D:\

...Documents and Settings

...ProgramData

...Users

And I think he wants:

D:\

...Win7Settings\

......Documents and Settings

......ProgramData

......Users

If I understand correctly. And I think he should be able to do that, shouldn't he?

Cheers and Regards

0

Share this post


Link to post
Share on other sites

yes, that's it bphlpt. Complaining is absurd, but I thought of this workaround to make my storage drive D: a bit more tidy, except I can't make it work. I can test over the VM to change location once installed just to check if Win7 prevents it, but my intention is to do this originally in install to avoid bugs or whatever could arise.

0

Share this post


Link to post
Share on other sites

yes, something "like" that, but from unattended. I can't find the link but I recall you or another user recommending me to change profile location as early as possible on a OS install.

Also, since it is an unattended, it makes sense to change the path before RunOnce runs.

0

Share this post


Link to post
Share on other sites

I'm not sure that answers what I am asking...
I'm already able to change partition for profile folders. What I'm unable to do is change path level.

bphlpt explained very well above.


If you wonder, my unattended.xml is already configured,

            <FolderLocations>                        <ProfilesDirectory>D:\Profiles\Usuarios</ProfilesDirectory>                        <ProgramData>D:\Profiles\ProgramData</ProgramData>            </FolderLocations>

unless you are 100% your method using audit mode works I can't fully bet on that since things involving USB etc can't be tested on a VM.

FYI, it didn't work for XP either in its unattended answer file, so something is up there and not on my side.

Edited by Dogway
0

Share this post


Link to post
Share on other sites

Well, it is NOT "my" method, I personally believe that "fully unattended" is "pure folly" (or "lost time") unless there is a "serious" reason, (like tens or hundreds of machines to be setup), and I have NO idea if it can work (or if it will work or if it may work with or without some slight or serious modifications).

You posted about not being able to find a link, and I tried to help you in finding it, without any comment/opinion (direct or indirect) on the actual validity of the question (let alone of the answer).

jaclaz

0

Share this post


Link to post
Share on other sites

"oh" semantics! your (*proposed*) method, duh!

The link I was talking about was a comment from you or another user here on msfn saying that changing profile folder after OS install is not recommended.

If you give me a link be it on placing profile folders on a sublevel path or instead something a bit more straight than the unattended method which your links are based on, because as I stated the install is ignoring them.

0

Share this post


Link to post
Share on other sites

Look, this is not semantics.

You asked for something about changing profiles folders location (WITHOUT mentioning "unattended") and I provided what I had available.

Then you asked about the same thing BUT this time asking for it being "earlier" or "unattended", and again I provided what I had available.

Will any of them ("after install", "in audit mode" or "unattended") work for "folders in folder"? :unsure:

Cannot say :no:, you will need to try ALL THREE methods to know.

jaclaz

Edited by jaclaz
0

Share this post


Link to post
Share on other sites

Then please re-read my OP.

I might be stating the obvious but is this mandatory, is there a reason for this, or a workaround? Thank you!

unattended - tested and not working
audit mode - the long way of unattended, so unlikely to work too
after install - prone to issues

0

Share this post


Link to post
Share on other sites

Then please re-read my OP.

I have read it, rest assured, and as said, provided what I had available related to "changing default folders locations" , which I have no idea if suitable to reach the goal which you have set for yourself.

Now you can try them, or try just one of them and assume that the other ones won't work, or (say) experiment with subst, mountpoints or (recursive) junction points :w00t::ph34r:, it's your goal, I just tried to assist you providing some related "prior art" :).

I might be stating the obvious but is this mandatory, is there a reason for this, or a workaround? Thank you!

The mentioned kb:

http://support.microsoft.com/kb/949977/en-us

or the related one:

http://support.microsoft.com/kb/929831/en-us

don't mention a limitation of this kind, but it wouldn't be the first (nor the last) time that MS originated info is unclear, incomplete, misleading or plainly wrong.

YMMGV :yes:

jaclaz

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
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

0

Share this post


Link to post
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

0

Share this post


Link to post
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.

0

Share this post


Link to post
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
0

Share this post


Link to post
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

0

Share this post


Link to post
Share on other sites

Any progress?

Cheers and Regards

0

Share this post


Link to post
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.

0

Share this post


Link to post
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
0

Share this post


Link to post
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.

0

Share this post


Link to post
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.