Windows Live Alerts
EnglishDeutsch
|
Contact
|  
   
 
Start access
Article
Support Forum
SBC FAQ
XenApp/XenDesktop
Remote Desktop Services
Terminal Services
Web Interface
Tips & Tools
Sponsors 
 
Lassen Sie sich von einem Experten Beraten

Web Interface code snippets Print E-mail

Here you find various Web Interface or NFuse code snippets that some nice people have send me, or that I found in the Citrix support forums. Most of them I have NOT tested, so use them at your own risk !

Some lines might be wrapped, so make sure you download the raw text file at the bottom of the page.


Flexible SecurID Web Interface 2.x modification

by Erik Ejlskov Jensen 
 
Some customers would like to have one securid username and another login name - the following code allows this: The passcode is entered as passcode / Securidusername

On line 74 in CExplicitAuthentication.vbs
  1. ' begin SecurID mod
  2. Dim fix
  3. ' if passcode is in 9999999999/userid format
  4. If Instr(passcode, "/") > 0 Then
  5. fix = Split(passcode, "/")
  6. passcode = fix(0)
  7. username = fix(1)
  8. End If
  9. ' end SecurID mod


Web Interface 3.0 seamless and non-seamless Apps

by Dave Fiske & Thomas Kötzing

Run a specific Publish Application (PA) in non-seamless mode while every other PA is still starting in seamless mode.
  1. Make a backup of the file Citrix\MetaFrame\site\include\serverscripts\launch.cs
  2. Near line 90 change the code from
    1. if (bSize) {
    2. DisplayMode = getCookie(NFuseCookie, COOKIE_MODE_WINDOW_TYPE);
    TO THE FOLLOWING
    1. if (bSize) {
    2. DisplayMode = getCookie(NFuseCookie, COOKIE_MODE_WINDOW_TYPE);
    3. if (gApp.urlEncode(ls.getAppName())=="Farm1x003aAccess") {
    4. DisplayMode = "default";
    5. }

Image NOTE

You need the WI Farm and Published App (PA) name for it to work. In the previous example the WI Farm name is Farm1 (default) and the PA name is Access. For spaces in the PA name use 0020 as a replacement.


Make Web Interface 3.0 pass UPN names to RSA Server

by Jay Tomlin

Normal behavior is that the WI sends NO UPN names, like user@domain, to the RSA Server. This code change this behavior
  1. Make a backup first, then
  2. Find the following near line 37 of /Citrix/Metaframe/site/include/serverscripts/authentication.cs:

    doNormalAuthentication = authenticateTwoFactor(shortUsername, shortDomain, passcode, clientId);

    Change this line to the following:

    doNormalAuthentication = authenticateTwoFactor(ExplicitUser, shortDomain, passcode, clientId);
  3. Save the file and changes take effect immediately.

Image NOTE

All changes are case-sensitive!


PrePopulate specific credentials

by Sam Jacobs

If you are an ASP and have a demo WI you might want to PrePopulate a specific Username and Password.

Web Interface 2.0

If you're using WI 2.x with explicit authentication, and you're NOT using NDS, backup the file: Citrix\MetaFrameXP\site\include\serverscripts\CHTMLLogin.vbs and open with notepad. At approx. line 129, you should see:
  1. If Not page.isNDS Then Call box("text", "UserName", "user", 256) Call
  2. box("password", "Password", "password", 254) If page.isShowDomain
  3. Then
CHANGE TO:
  1. If Not page.isNDS Then Call boxV("text", "UserName", "user", 256, "Demo")
  2. Call boxV("password", "Password", "password", 254, "Demo")
  3. If page.isShowDomain Then


Web Interface 3.0

Backup Citrix\MetaFrame\site\include\loginUPD.inc Open with notepad and at the top you should find:
  1. <%
  2. // loginUPD.inc
  3. //
  4. // Copyright (c) 2000 - 2004 Citrix Systems, Inc. All Rights Reserved.
  5. %>
AFTER ADD:
  1. <%
  2. //
  3. // if user/password is blank, pre-populate it
  4. //
  5. if (user == null || user == "") user = ExplicitUser;
  6. if (password == null || password == "") password = ExplicitPassword;
  7. %>


Automatically start in a published application folder

by Jay Tomlin

This is for users to be automatically dropped into an app folder after the Web Interface login.
  1. Make a backup of /Citrix/MetaFrame/site/include/serverscripts/applist.cs 
  2. Then find the following code near line 98:

    if (currentFolder == null) { currentFolder = ""; }


    Put the desired folder name between the quotation marks, like this:

    if (currentFolder == null) { currentFolder = "Microsoft Office Applications"; }

Display the (Full) Username after User login

by Didier Brageul

With this mod the (Full) Username can be displayed on the Welcome site. This customazation is for Web Interface 2.x
  1. Make a backup of /Citrix/MetaFrame/site/include/welcome.inc 
  2. replace it with one of the files inclued in the zip file.


by Sam Jacobs

With this mod the (Full) Username can be displayed on the Welcome site. This customazation is for Web Interface 4.x

FullUserName_4.x.zip


 
find or follow me @