How to hide the Citrix Logon Script DOS Windows

Author: NetworkAdminKB.com
Created: 2008-08-21
Modified: 2008-11-20
Article Content

Issue:

Logon scripts in Citrix environments may take a long time to process and are usually visible to users which can manually close them.  You want to hide the DOS window in which the Logon Script (BAT or CMD file) is run.

 

Cause:

DOS windows are displayed by default in the Windows environment.

 

Solution:

Citrix Presentation Server includes a program (ctxhide.exe) that can hide DOS windows when BAT or CMD files are launched from a command prompt or from within another BAT or CMD file.

 

CTXHide.exe is located in C:\Program Files\Citrix\System32, and is available from any command prompt (DOS window) because this location is included in the PATH environment variable.

 

To hide the initial Logon Script that (UsrLogon.cmd), you must place CtxHide.exe before the UsrLogon.cmd file name in the registry.  Run Regedit and go to the following registry key.

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\

1) Double-click the AppSetup value

2) Add the data value CtxHide.exe before the data value UsrLogon.Cmd. For example, your configuration might appear as follows:

Value Data: CtxHide.exe UsrLogon.cmd,cmstart.exe,C:\Program Files\Citrix\MetaFrame Password Manager\wts\ssolauncher.exe /nossoshutdown

Note: There are no commas placed between CtxHide.exe and UsrLogon.Cmd in the example.

In general to hide any BAT or CMD script from the user to the following:

1)      Create a Wrapper BAT or CMD file

a.       Inside this file place the following command

                                                               i.      Start Ctxhide script.cmd

b.      Using the Start command will allow the existing Wrapper script to end and close (very quickly), but the real script.cmd file will continue to run hidden from the users.

Article ID: 102, Created On: 9/17/2011, Modified: 9/17/2011