Folder Redirection - Can I still use an "All Users" function for the desktop?

Posted on 2006-06-07
Last Modified: 2010-04-18
I have enabled desktop redirection through a GPO for only a specific machine (Termninal server). If I have all of my users desktops redirected, how do I place a shortcut on the desktop of each user profile without creating it manually every time a new profile is created?

This would apply to only this machine, so I wouldn't want this done through a logon script that would add the shortcut to whatever machine they logged on to (I use Kixtart for logon scripts). If the desktop wasn't redirected, I would just use the "All Users" folder in Documents and Settings. Is there a way to setup a similar "All Users" folder when redirected?
Question by:brainbolt
    LVL 23

    Accepted Solution

    Unfortunately the "All users" doesn't support redirection.

    I believe you can add it to the default user profile on the machine though, but it will only take affect for new users (profiles) on that machine.  So depending on how many have already logged on you could put it in the default user desktop and then just delete off the existing user profiles and let them get recreated.
    LVL 21

    Expert Comment

    Create a GPO and use the following VBScript (with your changes made) as a User Logon Script.  

    To change the shortcut being created edit these 3 lines (you can omit the Icon line if you don't want to use a custom icon)
    link1target = "g:\groupdat\msds\HAZMATLookup.xls"
    link1icon = "\\sr3adc02\gposcripts\icons\hazmat.ico"
    link1name = "Hazmat Query.lnk"

    If you want to create more than 1 shortcut then you can just add another section with "link2" variables (make sure you dim your new variables at the top) and call the funciton again like

    CreateShortcut LoggedOnUsersDesktop link2name, link2target, link2icon

    option Explicit
    Dim fso, WShell, AllUsersDesktop, LoggedOnUsersDesktop, link1name, link1target, link1icon

    Set fso = CreateObject("Scripting.FileSystemObject")
    Set WShell = CreateObject("WScript.Shell")

    'Create the All Users Desktop and LoggedOnUsersDesktop variables
    AllUsersDesktop = "C:\Documents and Settings\All Users\Desktop\"
    LoggedOnUsersDesktop = WShell.ExpandEnvironmentStrings("%USERPROFILE%") & "\Desktop\"

    'link1 area for SPR HazmatLookup
    link1target = "g:\groupdat\msds\HAZMATLookup.xls"
    link1icon = "\\sr3adc02\gposcripts\icons\hazmat.ico"
    link1name = "Hazmat Query.lnk"

    CreateShortcut LoggedOnUsersDesktop, link1name, link1target, link1icon

    'Functions Section

    'Create a shortcut.  pass in (path to folder, shortcut name, shortcut target, path to icon)
    Function CreateShortcut(fldr, linkname, linktarget, linkicon)
          Dim link1
          If Not fso.FileExists(fldr & linkname ) Then
                Set link1 = wshell.CreateShortcut(fldr & linkname)
                link1.TargetPath= linktarget
                link1.IconLocation = linkicon
          End If
          Set link1 = Nothing
    End Function
    LVL 2

    Author Comment

    That did it, TheCleaner. Thanks.

    mcsween, I didn't test your method since TheCleaner's worked and is much less complicated. Thanks for your help though.
    LVL 23

    Expert Comment

    Welcome...btw mcsween's vbscript is worth hanging onto for creating shortcuts in the future...

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    This may not be a text book method to resolve VSS backup issues but it seemed to have worked on few of the Windows 2003 servers we had issues while performing a Volume Shadow Copy backup. If you have issues while performing a shadow copy backup usin…
    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…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now