?
Solved

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

Posted on 2006-06-07
4
Medium Priority
?
192 Views
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?
0
Comment
Question by:brainbolt
  • 2
4 Comments
 
LVL 23

Accepted Solution

by:
TheCleaner earned 1000 total points
ID: 16854985
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.
0
 
LVL 22

Expert Comment

by:mcsween
ID: 16855409
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



'~~~~~~~~~START~~~~~~~~~~~
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
            link1.Save
      End If
      Set link1 = Nothing
End Function
'~~~~~~~~~END~~~~~~~~~~~~~
0
 
LVL 2

Author Comment

by:brainbolt
ID: 16856054
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.
0
 
LVL 23

Expert Comment

by:TheCleaner
ID: 16856248
Welcome...btw mcsween's vbscript is worth hanging onto for creating shortcuts in the future...
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

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…
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…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

839 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