xp pro add multiple users, set alt "My Documents" path

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Question
I want to add 20 users to an XP pro system (local users, no domain, active
directory or ms server involved)) and I want each users "My Documents" folder
to be on a local D drive instead of C:\documents and settings\someuser. I'm
familiar with the addusers.exe command and the format of the file it needs.

I've done some testing with one account called test setting both the profile
path, and local path but that doesn't seem to quite work. When I specify a
profile path of d:\users\test (for user test) xp creates the test folder in
d:\users. But if I log in as test it complains that I'm using roaming
profiles , it can't find them and puts everything in C:\docs and
settings\temp. I've played around with permisions on D:\users, and
D:\useras\test so that it mimics C:\documents and settings but that has no
effect.

I know that I can do this by using addusers to create my 20 users, then log
on 20 times and "move" the my documents folder but I assume there is an
automatic way to do this?

thanks
 
Thanks Chris,
That looks to me like I would still have to execute that script after
logging in as each user. What I want is a way to create a user and specify
where his my documents folder is right on creation so I don't have to log in
20 times and fix things. I appreciate you taking the time to answer.
 
gbl,

Create a batch file and place it in the C:\Documents and Settings\All
Users\Start Menu\Programs\Startup folder. This will allow it to run
whenever any user logs on. To call the .inf in the batch file use the
command below

InfFile = "c:\path\whatever.inf"
rundll32.exe "setupapi,InstallHinfSection DefaultInstall 132 %InfFile%"


psg
 
You may use this script and customize the default user profile.

Copy the following lines to Notepad, and save as "SetUserPaths.VBS"

========================================================
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set WshShell = CreateObject("WScript.Shell")
On Error resume Next
UName=WshNetwork.UserName
USF= "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell
Folders\"
DocsPath = "D:\My Documents\" & UName
MusicPath= DocsPath & "\My Music"
PicturesPath = DocsPath & "\My Pictures"
WshShell.RegWrite USF & "Personal",DocsPath,"REG_SZ"
WshShell.RegWrite USF & "My Music",MusicPath,"REG_SZ"
WshShell.RegWrite USF & "My Pictures",PicturesPath,"REG_SZ"
Set WshNetwork= Nothing
Set WshShell= Nothing
========================================================

Place the VBScript in the RunOnce registry key when you customize the
Default user profile.

See:

How to create a custom default user profile:
http://support.microsoft.com/?kbid=319974

--
Ramesh, Microsoft MVP
Windows XP Shell/User

Windows XP Troubleshooting
http://www.winhelponline.com
 
Back
Top