Jump to content

Relocating Pathname/folders


Recommended Posts

Hi,

1) All relocating pathname/folders "winnt.sif command" i found are here bellow

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

[Unattended]  
ProgramFilesDir="C:\My Program Files"

As "My Documents" & "Favorites" pathnames/folders are a subfolders of "C:\Documents and Settings\" How do I relocate them into D: (disk) during the unattended installation???

Actually, I modify the registry after the installation

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]

exapmle key value "Personal" Data modified to "D:\My Documents".

2) What the universal "My Documents" & "Favorites" pathnames are in windows? (like %systemdrive%\Documents and Settings)

Regards

coucou

Link to comment
Share on other sites


The following RegTweaks change the location of where windows looks for your Wallpaper images, My Docs, My Pics and Favs

 ;--- WallpaperDir set to D:\!Personal!\My Pictures\Wallpaper
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion]
"WallPaperDir"=hex(2):44,00,3a,00,5c,00,21,00,50,00,65,00,72,00,73,00,6f,00,6e,\
 00,61,00,6c,00,21,00,5c,00,4d,00,79,00,20,00,50,00,69,00,63,00,74,00,75,00,\
 72,00,65,00,73,00,5c,00,57,00,61,00,6c,00,6c,00,70,00,61,00,70,00,65,00,72,\
 00,00,00

;----- Change default location of Wallpaper, My Docs, Favorites and My Pics
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
"Personal"="D:\Personal\My Documents"
"Favorites"="D:\Personal\Favorites"
"My Pictures"="D:\Personal\Pics"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
"Personal"="D:\Personal\My Documents"
"Favorites"="D:\Personal\Favorites"
"My Pictures"="D:\Personal\Pics"

And to answer your second question, it looks like it uses the full path in the registry.

Link to comment
Share on other sites

You only need to change the User Shell Folders keys, not the Shell Folder keys, also in the above reg example, the data is given as REG_SZ, when they are intended to be REG_EXPAND_SZ.

look at this message for an inf example, or you could make the change directly in one of your cmd files.

REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v  Personal /t REG_EXPAND_SZ /d "D:\%USERNAME%\My Documents" /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v  "My Pictures" /t REG_EXPAND_SZ /d "D:\%USERNAME%\My Documents\My Pictures" /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v  "My Music" /t REG_EXPAND_SZ /d "D:\%USERNAME%\My Documents\My Music" /f
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v  Favorites /t REG_EXPAND_SZ /d "D:\%USERNAME%\Favorites" /f

Link to comment
Share on other sites

the data is given as REG_SZ, when they are intended to be REG_EXPAND_SZ.

Looking at a non-modifed pc and theyre all stored as REG_SZ... why do they need to be changed to REG_EXPAND? I thought that was only needed if your string contained multiple lines...

Link to comment
Share on other sites

@ durex

No you are thinking of REG_MULTI_SZ

Also on an unmodified PC they are stored as REG_EXPAND_SZ as shown below.

Favorites - %USERPROFILE%\Favorites

My Music - %USERPROFILE%\My Documents\My Music

My Pictures - %USERPROFILE%\My Documents\My Pictures

Personal (My Documents) - %USERPROFILE%\My Documents

Your specific example didn't need changing, but;

The REG_EXPAND_SZ is used primarily because those keys usually, and in the case of my examples contain a variable (%USERNAME%). This is of course helpful in a multiuser environment so that each user has all their redirected folders placed under their own User Name or Profile, as they are by default in Windows XP (%USERPROFILE%). The expand bit basically refers to the fact that the OS will expand the variable when required to provide the true path location for the currently logged in user.

Hope this better explains it!

Link to comment
Share on other sites

TNX all,

Here the contents of my modified key registry: "User Shell Folders"

AppData        REG_EXPAND_SZ     %USERPROFILE%\Application Data
xxx            REG_EXPAND_SZ     %USERPROFILE%\xxx...
...
Favorites      REG_EXPAND_SZ     D:\Favorites
My Music       REG_EXPAND_SZ     D:\My Documents\My Music
My Pictures    REG_EXPAND_SZ     D:\My Documents\My Pictures
Personal       REG_EXPAND_SZ     D:\My Documents
Cache          REG_EXPAND_SZ    J:\Temp\Temporary Internet Files

Since i never view "Shell Folders" I was curious to see how its looks like

AppData        REG_SZ     C:\Documents and Settings\Administrator\Application Data
xxx            REG_SZ     C:\Documents and Settings\Administrator\xxx...
...
Favorites      REG_SZ     D:\Favorites
My Music       REG_SZ     D:\My Documents\My Music
My Pictures    REG_SZ     D:\My Documents\My Pictures
Personal       REG_SZ     D:\My Documents
Cache          REG_SZ    J:\Temp\Temporary Internet Files

... all paths are absolute

Question:

I've moved Outlook.pst file to D:\Outlook Data\ (Outlook/Tools/Optiond/Message/Data Files...)

It is possible to add a line in "User Shell Folders" as bellow and move in it my Outlook.pst file during the unattended install?

My Outlook    REG_EXPAND_SZ     D:\My Documents\My Outllok Data

Regards

coucou

Link to comment
Share on other sites

  • 3 months later...

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