Solved

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

Posted on 2004-08-25
3
1,366 Views
Last Modified: 2008-01-09
All,

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?

Ta.

Chris
0
Comment
Question by:What90
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
webmar45 earned 500 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!
martijn

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' 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
UserName=WshNetwork.UserName
if err.number <> 0 then
 UserName="NOBODY"
end if
err.clear
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 ''''''''''''
0
 
LVL 20

Author Comment

by:What90
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!
0
 
LVL 20

Author Comment

by:What90
ID: 11938628
Work a treat!

Thanks Again.

Must really try to learn more VBS stuff ;-)
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
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…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

710 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