This is one that has always frustrated me because there seems to be no elegant solution. I have used one or two workarounds in the past, which I'll get to in a moment, but I'd like to hear any thoughts or solutions y'all might have ...
So a very common setup for me is to use Folder Redirection (for obvious reasons) and have one or more RDSH servers (usually virtual). The RDSH (or RDSH collection) serves 2 purposes; it provides a virtual desktop for remote users (over VPN) and it provides access to certain applications to local users in the form of published RemoteApps.
I have numerous GPOs that create desktop shortcuts but of course the RemoteApp shortcuts should ideally only appear on the user's desktop when they're logged into a local workstation, not when they're logged into an RDSH. For example, when a member of the 'Accounts' security group log in, they need to get a shortcut to the Sage 50 Accounts application when logged into the RDSH and to the Sage 50 Accounts RemoteApp when logged into a workstation (because Sage 50 Accounts is not installed on every workstation). The problem is, thanks to Folder Redirection, both shortcuts appear, regardless of GPO user/computer targetting or whether the user is logged into the RDSH or a workstation, which isn't ideal.
Now I realise I can use the "Remove this item when it's no longer applied" property to remove the relevant unwanted shortcuts at login, but here's the problem with that:
(This is part of a longer script -- I've omitted the irrelevant stuff and the part that starts the RemoteApp)
Thinking about this as I write, I suppose one solution would be to not use the desktop at all and instead create pinned Taskbar or Start Menu shortcuts. But I prefer to let users choose what they want to pin and I think most users prefer a desktop shortcut.
Any thoughts or suggestions?
So a very common setup for me is to use Folder Redirection (for obvious reasons) and have one or more RDSH servers (usually virtual). The RDSH (or RDSH collection) serves 2 purposes; it provides a virtual desktop for remote users (over VPN) and it provides access to certain applications to local users in the form of published RemoteApps.
I have numerous GPOs that create desktop shortcuts but of course the RemoteApp shortcuts should ideally only appear on the user's desktop when they're logged into a local workstation, not when they're logged into an RDSH. For example, when a member of the 'Accounts' security group log in, they need to get a shortcut to the Sage 50 Accounts application when logged into the RDSH and to the Sage 50 Accounts RemoteApp when logged into a workstation (because Sage 50 Accounts is not installed on every workstation). The problem is, thanks to Folder Redirection, both shortcuts appear, regardless of GPO user/computer targetting or whether the user is logged into the RDSH or a workstation, which isn't ideal.
Now I realise I can use the "Remove this item when it's no longer applied" property to remove the relevant unwanted shortcuts at login, but here's the problem with that:
- User logs into a workstation.
- Shortcuts for the RDSH-installed applications are removed from the desktop.
- Shortcuts for the RemoteApps are added to the desktop (OK so far ...).
- (But then ... ) User opens a RemoteApp, which essentially means they're logging in to an RDSH.
- RDSH login policy triggers, removing the RemoteApp shortcut from the user's desktop.
Code:
@Echo Off
:: Local App Target
SET LocalApp=C:\Program Files (x86)\Sage\Accounts\SBDDesktop.exe
:: Local App Arguments
SET LocalArgs={DAF725D1-AA29-4801-9FD8-A3C6E51B3B5A}
:: Local App 'Start In'
SET LocalStart=C:\Program Files (x86)\Sage\Accounts\
:: Remote App Alias
SET RemoteApp=SBDDesktop
:: Check if app exists locally first
IF EXIST "%LocalApp%" (
:: Use locally installed copy instead
cd "%LocalStart%"
"%LocalApp%" "%LocalArgs%"
EXIT
)
(This is part of a longer script -- I've omitted the irrelevant stuff and the part that starts the RemoteApp)
Thinking about this as I write, I suppose one solution would be to not use the desktop at all and instead create pinned Taskbar or Start Menu shortcuts. But I prefer to let users choose what they want to pin and I think most users prefer a desktop shortcut.
Any thoughts or suggestions?