Friday, March 20, 2015

This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator.

[Window Title]
Restrictions

[Content]
This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator.

[OK]

We encountered this dialog with Citrix XenApp 6.5 sessions when using various programs.  The issue is this dialog is generated when a button would open a dialog and the default path was %userprofile% or %temp% or any other path that defaulted and started with C:\.  The cause of it is a group policy setting.  If you disable the viewing of the drive letter that the dialog is trying to default to; this message appears.  For us, some programs were trying to default to %TEMP% which is trying to go "C:\Users\myTest\AppData\Local\Temp\1".  Since "C:\" is in the path, this dialog was disallowed and the message popped up.

NOTE: This message will only pop up if the program uses the standard Windows dialog.  If a program uses a custom dialog it will not receive this message.

To avoid this issue we wanted to default to the users 'My Documents' folder, which is redirected and stored on an allowed drive letter.  But My Documents isn't a variable we can utilize.  But we can create a script that launches prior to our program launching and create the variable:


I used PowerShell.exe to get and return the variable as Reg.exe is disallowed and reg.exe wasn't returning the full path if the 'Personal' key had a space in it; powershell would return the full value.

In addition to setting this variable, our program(s) could now be configured to default to the new variable.

No comments: