Tuesday, September 27, 2011

How-To Configure Citrix Web Interface Zone Preference

This post will illustrate how to configure Citrix Web Interface to direct users to published resources in a particular zone when connecting through a specific Web Interface server.  It applies to web interface 5.2.


1 - Log in to the web interface server and open the Citrix Web Interface Management console.  Right click the site you are going to configure and click on Session Preferences.


2 - Select the Web Interface should override the ICA client name check box.

3 - Edit the SessionUtils.java file located in the C:\inetpub\wwwroot\Citrix\<sitename>\app_code\PagesJava\com\citrix\wi\pageutils folder.
In our case, we're looking to change the client name to "WM_<username>" or "WD_<username>" depending on which web interface server users are connecting to.  "WM_" is for the primary zone and "WD_" is for the backup.  This example will change it for the web interface server serving the primary zone. 

Comment out the following line:

deviceInfo.setClientName( clientName );

and copy the following just beneath it:

//The following two lines have been added in order to change the client name which enables us to set a zone //preference based on client to direct user's to a particular zone when connecting from a specific web interface //server
String userID = accessToken.getShortUserName();
deviceInfo.setClientName("WM_" + userID);

Note
: You cannot change hte length of the client name. For example, WDZO cannot be substituted for WD_

Here is a screenshot of the file when edited for the WI server in the primary zone:



4 - Open the Citrix XenApp Advanced Configuration Console and create a new policy for each zone that will specify zone preference and failover.

The settings are as follows for the primary zone policy:


Apply the policy filtered on the WM_ client name and select the Allow radio button.



5 - Repeat the steps taken on the web interface server on any other web interface servers where a zone preference is needed and edit the policy as necessary for zone preference and failover.

Notes:
You can check to verify your client naming convention is in force by logging into an application served by the web interface server you edited the SessionUtils.java file on. 

You can check the zone preference policy by publishing a test application or desktop and logging into each  web interface server and verify you land on a XenApp server in the zone that the web interface server is serving.

Friday, September 16, 2011

How-To: Create a Mandatory Profile in Windows 2008

This procedure was used to create a mandatory profile to be used in a XenApp deployment.  Using a mandatory profile will cause a user's environment to be "reset" each time they log on since a mandatory profile cannot be written to.  Because of this, you will need to employ some type of profile management solution if you want to allow users to customize their environment.  We use triCerat Simplify in my shop, but there are many other solutions available.  The advantage of using a mandatory profile is that you don't need to use roaming profiles which have traditionally been a nightmare as time passes and they become bloated and even corrupt.

1 – Create a folder on a file server to house the share.

2 – Share the folder with proper permissions.  Since this is going to house a mandatory profile, we only need to give authenticated users Read access, but leave Admins at Full Control:
  

3 – Create a folder within the share folder you just created to house the actual mandatory profile.
Add a .V2 extension to the folder’s name.
4 – Log on to a 2008 server that will only be loading up a local profile for an end user.  Run any programs, make any changes you want and then log back out.
5 – Log in as an admin on the same 2008 server and go to view the user profiles on the system.

6 – Select the user you logged on as before and click the “Copy To” button.  Then enter the path to your mandatory profile folder in the “Copy profile to” field.  Do NOT click OK yet.

7 – Click the Change button under “Permitted to use” and add Everyone.  Click OK.

8 – Click OK in the “Copy To” dialog.  Confirm the copy if prompted.




9 – Go back to the file server and verify the profile is copied into the folder you specified.
10 – Rename the ntuser.dat file inside the profile to ntuser.man.
11 - Go back to the 2008 server and remove the local profile for your template user.  Click OK all the way out of profiles and system settings.

12 – Set any policy or account attributes necessary to specify the use of the mandatory profile.

Wednesday, September 14, 2011

How-To: Create a Shortcut for Outlook 2007 Templates

Background/Purpose:  Outlook 2007 does not handle opening form templates the same way that its predecessors did.  You can no longer just double-click on an *.oft file and have it open on your desktop.  You must enter a series of button clicks/commands in Outlook to get it to open.  This procedure will show how to automate the process to make it easier on users.
This procedure uses a simple example and assumes you are using a home drive mapped to h:\ for end users. 
Here is the message a user would get if they try to double-click an *.oft file on a machine running Outlook 2007:

1 - Open OL2007 and click the Tools menu, then click Trust Center…

2 – Click on the Macro Security item and then choose either “Warnings for all macros” or “No security check for macros”.  Click OK.

Note:  “Warnings for all macros” is more convenient.  “No security check for macros” is more secure.
If you choose “Warnings for all macros”, then you will have to click through this warning when you run the macro:

3 –Click on the Tools menu and then click on Macro, Macros…

4 – In the Macros box that comes up, type the name of your macro (no spaces) and then click Create.


5 – In the VB editor that comes up, enter the following code making sure the path is correct for where the template form resides (*.oft file).


Click File, Save VbaProject.OTM

Close the VB editor.

6 – Click on Tools, Macro, Macros… and your new macro should be displayed in the box.  Select it and click the Run button to verify its operation.  Close the template that came up.

7 – Click on Tools, Customize…


8 – Click on the Commands tab and click on Macros under categories.  Your new macro should be displayed under Commands.

Click on the listed macro and drag it out to the menu location you want it in.  Give it a Friendly name.

Click Close.
Now you have shortcut that will open the form automatically instead of taking you through the steps listed here:
File > New > Choose Form > Look In: User Templates In File System > Your File.oft
The code should appear like this in the project:
---------------------------------------------------
Set newItem = Application.CreateItemFromTemplate("h:\your path\your form.oft")
newItem.Display
Set newItem = Nothing
---------------------------------------------------