PDA

View Full Version : Detecting Desktop Folder if it's redirected



NewsArchive
02-24-2015, 03:24 AM
We have a customer location that's having a problem that I've not seen
before.

Part of our application suite is a Clarion executable that when the
user navigates from their workstation to the server, it creates a
shortcut to our app (which is on the server) on their desktop.

We've never had a problem with this at all, and it's been this way for
years and years.

Now at this site, however, although our shortcut maker shows
"success", there are no icons placed on the desktops of any of the
workstations.

This is a secure government site, and we have problems just sending
any old app for testing, as it has to go through the proper channels.
So I want to make sure I cover all of the bases before sending them
anything.

I'm wondering if there's a GPO (Group Policy) that re-directs the
desktop, or perhaps some other setting that prevents the tried & true
calls to SHGetSpecialFolderPath from locating the actual desktop that
the user sees.

I don't know where to start with this diagnosis. Anyone know what (if
any) group policies would or could cause this?

If this is the cause, what should I do to detect the desktop that the
user is actually seeing on their screen?

Any ideas?

Thanks.

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

NewsArchive
02-24-2015, 03:25 AM
Hi Jeff,

Is the call to ShGetSpecialFolderPath returning the correct folder and
which CSIDL are you using
CSIDL_DESKTOP or CSIDL_DESKTOPDIRECTORY ?

Graham

NewsArchive
02-24-2015, 03:26 AM
I've been using CSIDL_DESKTOP (aka zero<g>)

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

NewsArchive
02-24-2015, 03:26 AM
Hi Jeff,

Seems setting up a GPO to make the desktop read-only is possible.

https://social.technet.microsoft.com/Forums/windowsserver/en-US/cebdf074-4cd8-4a5c-8a32-978b6747b6ff/disable-adding-or-removing-items-from-desktop

Graham

NewsArchive
02-24-2015, 03:27 AM
Sure, there's a whole raft of possible GPO settings to redirect stuff -
desktop, Documents folder, etc.

I've never played with using CSIDLs with those, though.

jf

NewsArchive
02-24-2015, 03:27 AM
Thanks Jane.

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

NewsArchive
02-24-2015, 03:27 AM
Very interesting !!! Thanks, Jane.

Friedrich

NewsArchive
02-24-2015, 01:05 PM
BTW,
A simple trick you can have somebody use to get an idea of what group
policies are in effect is to run

GPRESULT /H SomeFileName.htm

at a prompt.

Remember that group policies are like CSS - generally, the last one applied
"wins".

That command will dump the resultant set of policies (you can specify a
different user account if you want - check the help) into a file such as the
attached.

jf

NewsArchive
02-24-2015, 01:06 PM
SWEET.

Thanks Jane.

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.