How to Copy Files to User Profiles Using WiseScript
Updated: 01 May 2008
Definition: A user profile is a group of settings and files that defines the environment that the system loads when a user logs on.
It includes all the user-specific configuration settings, such as program items, screen colors, network connections, printer connections, mouse settings, and window size and position.
How to copy the files to user profiles using wise script
A Profile can be roaming profile or a local profile.
We have to search for the following registry value to get hold of users My documents or app data folders.
Profile whose user profile is redirected to H :\
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
"AppData"="C:\\Documents and Settings\\{USER}\\Application Data"
"Cookies"="C:\\Documents and Settings\\{USER}\\Cookies"
"Desktop"="H:\\apps\\xp\\Desktop"
"Favorites"="H:\\apps\\ie\\Favorites"
"NetHood"="C:\\Documents and Settings\\{USER}\\NetHood"
"Personal"="H:\\"
"PrintHood"="C:\\Documents and Settings\\{USER}\\PrintHood"
"Recent"="C:\\Documents and Settings\\{USER}\\Recent"
"SendTo"="C:\\Documents and Settings\\{USER}\\SendTo"
"Start Menu"="C:\\Documents and Settings\\{USER}\\Start Menu"
"Templates"="C:\\Documents and Settings\\{USER}\\Templates"
"Programs"="C:\\Documents and Settings\\{USER}\\Start Menu\\Programs"
"Startup"="C:\\Documents and Settings\\{USER}\\Start Menu\\Programs\\Startup"
"Local Settings"="C:\\Documents and Settings\\{USER}\\Local Settings"
"Local AppData"="C:\\Documents and Settings\\{USER}\\Local Settings\\Application Data"
"Cache"="C:\\Documents and Settings\\{USER}\\Local Settings\\Temporary Internet Files"
"History"="C:\\Documents and Settings\\{USER}\\Local Settings\\History"
"My Pictures"="C:\\Documents and Settings\\{USER}\\My Documents\\My Pictures"
"Fonts"="C:\\windows\\Fonts"
"My Music"="H:\\My Music"
"CD Burning"="C:\\Documents and Settings\\{USER}\\Local Settings\\Application Data\\Microsoft\\CD Burning"
"My Video"=""
"Administrative Tools"="C:\\Documents and Settings\\{USER}\\Start Menu\\Programs\\Administrative Tools"
*{USER} - Current user who is currently logged in.
Profile whose user profile is not redirected , pointing to c:\documents and settings.
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
"AppData"="C:\\Documents and Settings\\{USER}\\Application Data"
"Cookies"="C:\\Documents and Settings\\{USER}\\Cookies"
"Desktop"="C:\\Documents and Settings\\{USER}\\Desktop"
"Favorites"="C:\\Documents and Settings\\{USER}\\Favorites"
"NetHood"="C:\\Documents and Settings\\{USER}\\NetHood"
"Personal"="C:\\Documents and Settings\\{USER}\\My Documents"
"PrintHood"="C:\\Documents and Settings\\{USER}\\PrintHood"
"Recent"="C:\\Documents and Settings\\{USER}\\Recent"
"SendTo"="C:\\Documents and Settings\\{USER}\\SendTo"
"Start Menu"="C:\\Documents and Settings\\{USER}\\Start Menu"
"Templates"="C:\\Documents and Settings\\{USER}\\Templates"
"Programs"="C:\\Documents and Settings\\{USER}\\Start Menu\\Programs"
"Startup"="C:\\Documents and Settings\\{USER}\\Start Menu\\Programs\\Startup"
"Local Settings"="C:\\Documents and Settings\\{USER}\\Local Settings"
"Local AppData"="C:\\Documents and Settings\\{USER}\\Local Settings\\Application Data"
"Cache"="C:\\Documents and Settings\\{USER}\\Local Settings\\Temporary Internet Files"
"History"="C:\\Documents and Settings\\{USER}\\Local Settings\\History"
"My Pictures"="C:\\Documents and Settings\\{USER}\\My Documents\\My Pictures"
"Fonts"="C:\\WINDOWS\\Fonts"
"My Music"="C:\\Documents and Settings\\{USER}\\My Documents\\My Music"
"CD Burning"="C:\\Documents and Settings\\{USER}\\Local Settings\\Application Data\\Microsoft\\CD Burning"
"My Video"=""
"Administrative Tools"="C:\\Documents and Settings\\{USER}\\Start Menu\\Programs\\Administrative Tools"
Once we get the reg value we can use that location when copying files.
Cheers,
Wiseuser
blog entry Filed Under:

The Endpoint Management Community Blog is the perfect place to share short, timely insights including product tips, news and other information relevant to the Endpoint Management community. Any authenticated Connect member can contribute to this blog.