Solved

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

Posted on 2004-08-25
3
1,369 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

So you have two Windows Servers and you have a directory/folder/files on one that you'd like to mirror to the other?  You don't really want to deal with DFS or a 3rd party solution like Doubletake. You can use Robocopy from the Windows Server 200…
The HP utility "HP Lights-Out Online Configuration Utility for Windows Server 2003/2008" could be of great use when it comes to remotely configure a HP servers ILO WITHOUT rebooting the server. We would only need to create and run scripts using thi…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

624 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