Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows Server 2003Windows 2000Windows NTSmall Business ServerVirtual ServerExchange ServerIISHost Integration ServerISA ServerSMSWSUSMOMWindows Media ServerSecurityCertification
Related Topics
SQL ServerMS WindowsMS OfficePC HardwareMore Topics ...

Windows Server Forum / Windows 2000 / Registry / March 2006

Tip: Looking for answers? Try searching our database.

Force My Documents Desktop Icon for TS Users

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
amberry@gmail.com - 06 Mar 2006 23:26 GMT
I have one particular terminal server that I wish for each user logging
in to have a mandatory My Documents icon to show on thier desktop.

Now, I know you can Disable the "Remove My Documents icon on the
desktop" entry in the GPO, however if the user did not previously have
the icon showing (which most don't by default), it still does not force
the My Documents icon to be shown.  In addition, even if they have the
icon, the user can delete the icon if it exists right off their desktop
even with the above policy in place (keep in mind the My Documents icon
is not just a regular shortcut).  There should be a way for users to be
restricted from doing so, or perhaps on login a registry setting can be
defined to re-create the icon on login...either way...what options are
available.  This is quite annoying as we don't want Help Desk calls for
user's that delete ther My Document's icon.

I'd like to shy away from hiding the My Documents icon, and then
distributing a regular shortcut via a login script if at all possible.
And no, Mandatory Profiles is not an option, sorry guys.

I'm operating under Windows Server 2003 in a terminal services
enviornment and would like to implement this under group policy so that
if registry entries need to be defined and we add a new terminal
server, this doesn't have to be manually done all over again.

Thanks, your help is much appreciated...!
Mariette Knap [SBS MVP] - 07 Mar 2006 00:04 GMT
> I have one particular terminal server that I wish for each user
> logging in to have a mandatory My Documents icon to show on thier
[quoted text clipped - 21 lines]
> that if registry entries need to be defined and we add a new terminal
> server, this doesn't have to be manually done all over again.

One of my tricks I use for this. Add this to the vb loginscript. If you
don't have a loginscript you should make one:

Const HKEY_LOCAL_MACHINE = &H80000002
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_USERS = &H80000003

strComputer = "."

Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")

' Set link to home users folder

Set objNetwork = CreateObject("Wscript.Network")
strUser = objNetwork.UserName
strPath = "\\Srvfile01\FolderRedirection\" & strUser & "\My Documents"

Set objShell = CreateObject("Wscript.Shell")
strPrograms = objShell.SpecialFolders("Desktop")

Set objShellLink = objShell.CreateShortcut(strPrograms & "\" & "Mijn
Documenten" & ".lnk")
objShellLink.TargetPath = strPath

objShellLink.Description = "Home folder for " & strUser
objShellLink.WorkingDirectory = strPath
objShellLink.Save

When the user logs off and on again the User icon is back on the desktop.
Signature

Mariëtte Knap
Microsoft SBS-MVP
One of the Magical M&M's
www.smallbizserver.net
Take part in SBS forum:
http://www.smallbizserver.net/Default.aspx?tabid=53

amberry@gmail.com - 07 Mar 2006 14:23 GMT
Thanks for the suggestion!  From what I can see, this still creates a
standard shortcut (.lnk) instead of forcing the "real" My Documents
icon for the users--which is really my goal.  Also, yes I do have login
scripts in use throughout my domain based on GP, however they are not
VB script (they are .bat or .cmd).  I'm also not very good at working
with VB yet, my apologies. If registry work needs done, I'll need a few
extra pointers, expecially if I can't make one manual change to the
registry and must use scripting for either the user or computer.  Any
other suggestions...?
TP - 07 Mar 2006 22:44 GMT
Hi Mariette,

Another trick for your bag:

If you need a .lnk shortcut to My Documents, you can
create it using the standard right-click method.  The
command line is:

explorer.exe ::{450D8FBA-AD25-11D0-98A8-0800361B1103}

The icon for My Documents is located in %SystemRoot%\system32\mydocs.dll

After you have created this .lnk file, it can be copied for
use with any user.  No need to customize to make it work.

For the OP's scenario of wanting it on the desktop, I think the
ADM template I provided is the best way.

-TP

>One of my tricks I use for this. Add this to the vb loginscript. If
> you don't have a loginscript you should make one:
[quoted text clipped - 27 lines]
> When the user logs off and on again the User icon is back on the
> desktop.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.