Sunday, December 11, 2011

Citrix version

 MetaFrame 1.8 
 MetaFrame XP 1.0 for Microsoft NT 4.0 Server Terminal Server Edition
 MetaFrame XP 1.0 for Microsoft Windows 2000
MetaFrame XP 1.0 Feature Release 3 with Service Pack 4
Citrix Presentation server 3.0
Citrix Presentation server 4.0
Citrix Presentation server 4.5
Xenapp 5  for windows 2003
Xenapp 5  for windows 2008
Xenapp 6  for windows 2008

Monday, November 28, 2011

How to Change the ICA Port Number Assignment


Use the ICAPORT utility from a command prompt. The output of ICAPORT /? is shown below:
Change value of TCP/IP port for ICA Terminal Sessions.
ICAPORT {/QUERY | /PORT:num | /RESET}
/QUERY Query current setting.
/PORT:num Change the TCP/IP port to 'num'.
/RESET Reset the TCP/IP port to 1494.
The value of the port number is stored in hex at the following registry DWORD value:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\ICA-tcp


Type ICAPORT /PORT:XXX where XXX represents the port number from 0 to 65535.
2. Restart the XenApp server for the change to take effect.
3. Modify the necessary client connection parameters to connect to the server on the new port number. For example, add :XXX after the server address or published application name, where XXX is the assigned port number established in Step 1.
NOTE: Running ICAPORT /RESET sets the port back to the default value of 1494.


Friday, September 23, 2011

How to publish outlook config in citrix


Command Line

rundll32.exe shell32.dll,Control_RunDLL
 "C:\Program Files\Common Files\System\MSMAPI\1033\mlcfg32.cpl"

Thursday, September 22, 2011

citrix commands

Qfarm /load to check load in the server farm

Dsmaint recreatelhc  to recreate local host cache

Dscheck  to check the data store connectivity

citrix license server commands

lmstat –c @localhost –a

lmstat -c

lmstat -a

Friday, September 2, 2011

WFCRUN32 /? popup when launching published app

Source-http://www.markbrilman.nl/2011/08/wfcrun32-popup-when-launching-published-app/


When you launch a published application via the Citrix WebInterface, a WFCRUN32.EXE /? popup appears. Your application will not launch. Your application will launch when you use the PNAgent. Your application will also launch when you browse to your %temp% folder and doubleclick the created .ica file.
This is probably a bug. Starting from version 11.2 Citrix might have changed something in the way the plugin uses ActiveX. When you click an application in your Citrix WebInterface the popup below shows.

There are several possible solutions, but all of them are mearly a workaround (and most of them don’t work)
  • Reinstall your Plugin. Also re-create your userprofile
  • Change the location of your %tmp% and %temp% variables to a location without spaces
  • Disable 8.3 Name Creation by setting this key: HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation to 0 (zero)
  • Disable ActiveX for your Trusted Sites zone by setting this key: HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1208 to 3 (three)
Note: Ofcourse for the last key your WebInterface server must be in your Trusted Sites zone. If it’s in another zone you obviously need to change the key for that zone.
Resolution:
In my case the troublemaker was the Citrix ICA-Client Add-On in Internet Explorer.
(Check if you have one installed by clicking tools > Manage Add-Ons and then in the dropdown menu show all add-ons)
This add-on conflicts with HKCU\Software\Microsoft\Windows\Current Version\Internet Settings\Zones\2\1208 key. In our scenario the webinterface is in Trusted Sites (which is zone 2)
The 1208 key represents: Allow previously unused ActiveX controls to run without prompt.
Value 0 = enabled, Value 3 = Disabled.
When you have the add-on installed:
  • And it’s set to disabled. You need to set the 1208 key to 3 to get a working situation.
  • And it’s set to enabled. You will not manage to get a working situation.
When the add-on is not installed the 1208 key doesn’t matter. 0 or 3 is both fine.
You can unregister the add-on with:
C:\Program Files\Citrix\ICA Client>regsvr32 /u Wfica.ocx
Keep in mind that Client Detection on your webinterface will not work anymore.

How to publish a power point template in citrix

C:\Program Files\Microsoft Office\Office14\POWERPNT.EXE  "C:\Program Files\Microsoft Office\Templates\test\test.pot"

How to publish a website in citrix

Command line

"C:\Program Files\Internet Explorer\iexplore.exe" http://techropes.blogspot.com

How to publish a vbs file in citrix

c:\windows\system32\cscript.exe "C:\Program Files\app\app.vbs"

Thursday, September 1, 2011

session reliability in citrix


  • When enabled, it allows a session to automatically reconnect when network connectivity is lost
  • It requires a new TCP port: 2598.
  • It doesn’t work via Citrix Secure Gateway (this is fixed in MPS 4)
  • It requires ICA clients version 8.
In environments where Session Reliability is enabled, TCP port 2598 replaces port 1494 as the port that the ICA protocol uses.

Tuesday, August 30, 2011

The Remote session was disconnected because there are no terminal server

The Remote session was disconnected because there are no terminal server
license servers available to provide a license. Please contact the server
administrator.



[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing\Store] key on their machines. 

Removing Terminal Server licenses from an RDP client

If an unlicensed client connects to a Terminal Server for the first time, the Terminal Server issues the client a temporary Terminal Server Client Access License (CAL) token. After the user has logged into the session, the Terminal Server instructs the License Server to mark the issued temporary Terminal Server CAL token as being validated. The next time the client connects, an attempt is made to upgrade the validated temporary Terminal Server CAL token to a full Terminal Server CAL token. If no license tokens are available, the temporary Terminal Server CAL token will continue to function for 90 days. The license is stored in the client's registry. 

Thirty-two bit RDP clients store their license under the key HKEY_LOCAL_MACHINE\Software\Microsoft\MSLicensing.

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:

322756  How to back up and restore the registry in Windows

To have us fix this problem for you, go to the "Fix it for me" section. If you prefer to fix this problem yourself, go to the "Let me fix it myself" section.

Fix it for me



To fix this problem automatically, click the Fix it button or link. In the File Download dialog box, click Run, and then follow the steps in the Fix it Wizard.


Fix this problem 
Microsoft Fix it 50683

Notes
  • This wizard may be in English only. However, the automatic fix also works for other language versions of Windows.
  • If you are not on the computer that has the problem, save the Fix it solution to a flash drive or a CD and then run it on the computer that has the problem.

Then, go to the "Did this fix the problem?" section.



Let me fix it myself


To clean the client's license cache, just delete this key and its subkeys. The next time the client connects to the server, it will obtain another license. 

For 16-bit RDP clients, run regedit /v. Then delete the keys under "\Software\Microsoft\MSLicensing" to clean the client's license cache. You can also delete the BIN files from \Windows\System\Regdata. 

The RDP client for Macintosh stores the license in a file on the local computer in the folder hierarchy under /users/Shared/Microsoft/RDC Crucial Server Information/. To clean the Macintosh client's license cache, delete the contents of this folder. The client will try to obtain a new license from the server the next time that it connects.

If you delete the HKEY_LOCAL_MACHINE\Software\Microsoft\MSLicensing subkey on a client that is running Windows Vista or a later version, later attempts to connect to a Terminal Server may fail. Also, you receive the following error message:
An Error occurred in the Licensing Protocol
To resolve this problem, right-click the Remote Desktop Connection shortcut, and then clickRun as Administrator. By default, the remote desktop connection runs as a user with the lowest user permissions. By default, a restricted user does not have permission to write registry entries to HKEY_LOCAL_MACHINE. Therefore, attempts to rewrite the MSLicensing key fail. Starting Remote Desktop Connection with administrative credentials provides the permissions that are necessary to write the needed registry keys. 

Friday, August 26, 2011

Thursday, August 25, 2011

Citrix Change user install mode


When installing an application on a terminal server it is necessary to change the server to install mode by running “change user /install” from a command prompt or by performing the install through “Add/Remove Programs.”  After the installation you must run “change user /execute” to bring it out of install mode.  This ensures that the .ini files for the installed application are stored in the Terminal Server system directory.  These files are used as the master copies for the user-specific .ini files. 
Why is this important?  When a user runs an application for the first time, the application looks in the home directory for its .ini files.  If it does not find them in the home directory it will look in the Terminal Server system directory and copy them to the user’s home directory.  If an application is installed while the server is not in install mode, the .ini files will be saved to the home directory.  New users will therefore be unable to pull down the .ini files from the Terminal Server system directory, and the application will not run.
Change Terminal Server Session properties, use when installing software on a terminal server.
Syntax
      CHANGE USER /options
      CHANGE LOGON /options
      CHANGE PORT /options

Options:
  To change .INI file mapping: (administrator rights required)

  CHANGE USER /INSTALL   Enable install mode. This command has to be run before
                         installing any new software on a Terminal Server.
                         This will create a .ini file for the application
                         in the TS system directory.

  CHANGE USER /EXECUTE   Enable execute mode (default)
                         Run this when an installation is complete.

  CHANGE USER /QUERY     Display current settings.

  To enable or disable terminal session logins:

  CHANGE LOGON /QUERY    Query current terminal session login mode.
  CHANGE LOGON /ENABLE   Enable user login from terminal sessions.
  CHANGE LOGON /DISABLE  Disable user login from terminal sessions.


  To list or change COM port mappings for the current session.
  This can allow DOS applications to access high numbered ports e.g. COM12

  CHANGE PORT portx=porty      Map port x to port y.
  CHANGE PORT /D portx         Delete mapping for port x.
  CHANGE PORT /QUERY           Display current mapping ports.

How .ini files work:

Installing an application will create a .ini file in the TS system directory.

The first time a user runs the application, the application looks in the home directory for its .ini file. If none is found then Terminal Server will copy the .ini file from the system directory to the users home directory.

Each user will have a unique copy of the application's .ini file in their home directory.

To learn more about what happens when the system is put into install mode run CHANGE USER /?

The CHANGE command replaces CHGLOGON, CHGUSER, and CHGPORT from Citrix Winframe.

Direct and Indirect Data Store Connection



Direct and Indirect Data Store Connection

A MetaFrame Presentation Server can connect to the IMA Data Store in two ways. Depending on the type of database software you decide to use, MPS servers make either a direct connection or an indirect connection.
A direct connection to the IMA Data Store means that the database software resides on a dedicated server and all the MetaFrame servers connect directly to this dedicated database server and plug into the IMA Data Store. This type of connection is associated with Microsoft SQL Server, Oracle, and IBM DB/2 databases.
An indirect connection to the IMA Data Store means that the first MetaFrame server you install in the farm hosts the Data Store, which is in the format of a Microsoft Access or an MSDE database. All MPS servers added thereafter will connect to the first MPS server, which hosts the IMA Data Store and will then connect to the Data Store, thereby making an indirect connection. The MPS servers can’t connect directly to the Data Store database but first have to connect to the MPS server and then to the Data Store it hosts.

Heap size modification in citrix applications


Java virtual machine memory erroryy

Could not create the Java virtual Machine


If you  get Java virtual machine memory error in your citrix server.

Please try to remove the splash screen in your java application script .




see the below document you may get more ideas

Java Virtual Machine tuning

This section describes how you can tune your Java™ Virtual Machine (JVM) for TBSM.
In addition to the TBSM database tuning parameters described for the Discovery Library Toolkit in Tuning for the Discovery Library toolkit, a correctly tuned JVM provides the best possible performance for TBSM server processing. Of the many parameters that can be set for a JVM, those that make the biggest difference for the TBSM Data and Dashboard servers are:
  • Minimum heap size
  • Maximum heap size
Although correct JVM tuning helps TBSM performance, one set of parameters does not fit all environments. Each environment might respond differently to certain tuning parameters based on factors such as platform (Windows® or UNIX®), processor speed, number of processors, amount of installed RAM, and memory space addressable by the operating system. In addition, other co-resident applications such as PostgreSQL and Discovery Library Toolkit also consume and compete for system resources.
By default, both the TBSM Data and Dashboard servers are installed with the following values for the JVM.

Table 1. JVM performance tuning values
JVM parameterWindowsUNIXDescription
Minimum heap size (-Xms)256 Mb256 MbSets the minimum heap size for the TBSM JVM.
Maximum Heap Size (-Xmx)512 Mb512 MbSets the maximum memory size for the TBSM JVM.
Although the default values listed in Table 1 might be sufficient for small environments, if your environment consists of a service model that includes more than 1000 service instances, you might need to increase the value for both heap size parameters.

Modifying the heap size

To achieve the 1.6 GB heap in the Windows environment, the /3GB switch needs to be configured in theboot.ini file. This switch tells the operating system to reserve 3 Gb of the available RAM for applications and only 1 GB of RAM for the OS. Otherwise, without this switch, Windows will by default reserve half of the available memory for the OS, leaving the other half to be shared between applications. For example, if you do not set the /3GB switch on a machine with 4 Gb of RAM, you will only have 2 Gb of shared RAM for all applications. This means that the maximum amount of memory that can be allocated to the TBSM server heap will most likely be much less than 2 Gb.
For more information, see the Windows documentation. Add the /3GB switch to the boot.ini file as follows:.
  1. Right click on My Computer and select > Properties > Advanced > Startup and Recovery [Settings].
  2. Click on the Edit button immediately following this prompt; To edit the startup options file manually, click Edit.
  3. Add the /3GB switch to the [operating systems] section, in the last line of the file.
Here is an example boot.ini file with the /3GB parameter set.
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Enterprise" /NoExecute=OptOut /3GB /PAE /fastdetect
Note: If a heap of the specified size cannot be allocated to the JVM process, the JVM will not start.
To modify the heap sizes on the Data server, perform the following steps:
  1. Stop the TBSM Data server, if it is running.
  2. Issue the command wsadmin.bat -lang jython -conntype NONE from the following directory:
    • UNIX $TIP_PROFILE/profiles/profile_name/bin
    • Windows %TIP_HOME%\profiles\TBSMProfile\bin
  3. At the wsadmin> prompt, issue the following commands, where xxx is the heap size value, in megabytes, that you want:
    jvm=AdminConfig.list("JavaVirtualMachine")
    
    AdminConfig.modify(jvm, '[[initialHeapSize xxx]]')
    AdminConfig.modify(jvm, '[[maximumHeapSize xxx]]')
    AdminConfig.save()
    
    exit
  4. Start the TBSM Data server. Your changes will be included when the server starts.
    If you attempt to start the TBSM Data server on Windows with a maximum heap size that is too large, error messages that are similar to the following will be generated in the%TIP_HOME%\profiles\profile_name\logs\server1\native_stderr.log directory:
    JVMJ9GC019E -Xms too large for -Xmx
    JVMJ9VM015W Initialization error for library j9gc23(2): Failed to initialize
    Could not create the Java virtual machine.
To modify JVM heap sizes on the Dashboard server, perform the following steps:
  1. Stop the Dashboard server, if it is running.
  2. Issue the command wsadmin.bat -lang jython -conntype NONE from the following directory::
    • UNIX $TIP_PROFILE/profiles/profile_name/bin
    • Windows %TIP_HOME%\profiles\TIPProfile\bin
  3. At the wsadmin> prompt, issue the following commands, where xxx is the heap size value, in megabytes, that you want:
    jvm=AdminConfig.list(”JavaVirtualMachine”)
    AdminConfig.modify(jvm, ‘[[initialHeapSize xxx]]’)
    AdminConfig.modify(jvm, ‘[[maximumHeapSize xxx]]’)
    AdminConfig.save()
    exit
  4. Start the TBSM Dashboard server. Your changes will be included when the server starts.
    If you attempt to start the TBSM Data server on Windows with a maximum heap size that is too large, error messages that are similar to the following will be generated in the%TIP_HOME%\profiles\profile_name\logs\server1\native_stderr.log directory:
    JVMJ9GC019E -Xms too large for -Xmx
    JVMJ9VM015W Initialization error for library j9gc23(2): Failed to initialize
    Could not create the Java virtual machine.
Attention: If you set either of these properties to values that are incorrect, the TBSM Data server, the TBSM Dashboard server, or both might fail to start.

Client-side JVM tuning

Within the client Web browser hosting the TBSM console is a JVM plug-in that is needed for running client-side Java code. Just like the JVM running the either of the TBSM servers, the browser plug-in JVM can also be tuned to specify initial and maximum heap sizes. Typically, an untuned plug-in JVM has an initial heap size of no more than 4 MB and a maximum heap size of 64 MB, though these numbers can vary depending on the platform being used.
The GUI Service Viewer is the feature most affected by changes to JVM parameters. You might be able to improve the performance of the service viewer by increasing the initial heap size (-Xms) to 32 MB and the maximum heap size (-Xmx) to 64 MB. Of course, whether this configuration change is really needed or not will depend on the size of the business service model being loaded by the Service Viewer.
The procedure to change the JVM plug-in tuning parameters can be different depending on the provider of the plug-in (for example IBM® or Sun) and also depending on the platform (Windows or UNIX). As an example, the following procedure shows how to access and set the JVM plug-in parameters for the IBM-provided 1.5.0 plug-in on Windows:
  1. Click Control Panel > Java Plug-in.
  2. Click the Advanced tab.
  3. In the text box under Java Runtime Parameters, type the following:
    -Xms32m -Xmx64m
  4. Click Apply and then close the window.
After you make these changes, you might need to log out of and then log in to the TBSM console.
Note: To change the JVM plug-in parameters on a supported UNIX platform, navigate to the /binsubdirectory under the file system location where the plug-in is installed and look for a shell script named either ControlPanel or JavaPluginControlPanel, depending on the version of Java. Run this shell script to open a GUI that will look similar to the equivalent interface on the Windows platform.