Renaming My Documents folder to My "username" for Domain Users

Posted on 2004-08-25
Medium Priority
Last Modified: 2008-01-09

How do you rename the My Documents Folder to My "Logged in Username" on the desktop/Documents and Settings via a GPO for the users in one domain?

Have been asked this question and can't for the life of me remember how to do this.

Can anyone put me out of my misery and tell what to do?


Question by:What90
  • 2

Accepted Solution

webmar45 earned 2000 total points
ID: 11900421
hi thy this script,
name it script.vbs and define it in an gpo for all users you want,
test it first!

' This script will change the name of "My Documents" on the desktop
' to the username of the person logged in.
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set WshShell   = WScript.CreateObject("WScript.Shell")

' Error checking & get user
on error resume next
if err.number <> 0 then
end if
on error goto 0

' This next line rewrites the (Default) value
' This will need to be changed depending on what version of windows
you have(currently XP)
WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{450D8FBA-AD25-11D0-98A8-0800361B1103}\",
UserName & "'s Documents"

'Refreshed desktop
WshShell.AppActivate "Program Manager"
WshShell.Sendkeys "{F5}"

'''''' end  copy ''''''''''''
LVL 20

Author Comment

ID: 11937471
Hello webmar45,

Haven't forgot about you or your quick reply, I'm just having trouble getting back to a site where I can test it.

Thanks again for the quick reply!
LVL 20

Author Comment

ID: 11938628
Work a treat!

Thanks Again.

Must really try to learn more VBS stuff ;-)

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Many of us need to configure DHCP server(s) in their environment. We can do that simply via DHCP console on server or using MMC snap-in on each computer with Administrative Tools installed in a network. But what if we have to configure many DHCP ser…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This video tutorial shows you the steps to go through to set up what I believe to be the best email app on the android platform to read Exchange mail.  Get the app on your phone: The first step is to make sure you have the Samsung Email app on your …
If you are looking for an automated solution for backup single or multiple Office 365 user mailboxes to Outlook data file, then you can use Kernel Office 365 Backup & Restore tool. Go through the video to check out the steps to backup single or mult…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question