How to enable the log file that records the start time of applications and the MDO mode information in SoftGrid

Article translations Article translations
Article ID: 931252 - View products that this article applies to.
Expand all | Collapse all

On This Page

INTRODUCTION

This article describes how to enable the log file that records the start time of applications and the Minimal Disconnected Operation (MDO) mode information when you use the Microsoft SoftGrid for Terminal Services client and the Microsoft SoftGrid for Windows Desktops client.

MORE INFORMATION

When you use the SoftGrid Client 3.0 Service Pack 2 (SP2) or a later version of the SoftGrid Client, you can generate a log file that records the following information:
  • The date and time when a user starts an application
  • The date and time when a user shuts down an application
  • The date and time when an application does not start successfully
  • The date and time when MDO starts and stops
You can also configure SFTTray.exe to log the same information in the event log.

Registry entries that are required to enable the log file

To enable the log file, you must add registry entries under the following registry subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Softricity\SoftGrid Client\CurrentVersion\Configuration
You add the following registry entries:
  • LaunchRecordLogPath
  • LaunchRecordMask

LaunchRecordLogPath

Collapse this tableExpand this table
ValueTypeExample
LaunchRecordLogPathREG_SZC:\sft_recordlog.txt
To generate a log file, you must specify a full path for this value. The users whose activities you want to log must have permission to create and to write to the log file. You can configure the client to write to a log file on any computer to which the user has access. This includes local paths and network shares that have Universal Naming Convention (UNC) names.

LaunchRecordMask

Collapse this tableExpand this table
ValueTypeExample
LaunchRecordMaskREG_DWORD0x0000001A
Use this value to enable or to disable logging individually for any of the five events if the LaunchRecordLogPath value is set. If LaunchRecordMask is not present, all file-based logging will be enabled. If LaunchRecordMask is present, you can set the five least significant bits (hexadecimal 0x1, 0x2, 0x4, 0x8, and 0x16) to enable start messages, error messages, shutdown messages, disconnect messages, and reconnect messages, respectively.

Whether or not you set LaunchRecordLogPath, you can use LaunchRecordMask to enable logging to the event log. You can use the bits at hexadecimal 0x10000, 0x20000, 0x40000, 0x80000, and 0x100000 to enable event logging for the start messages, the error messages, the shutdown messages, the disconnect messages, and the reconnect messages, respectively. You can combine these with one another and with the bits that control file-based logging.

By default, start errors will be logged to the event log only if you enable file-based logging by setting LaunchRecordLogPath.

Because values for LaunchRecordMask can be confusing to figure out, some common combinations are documented in the following table.
Collapse this tableExpand this table
Value (hexadecimal)Value (decimal)Event log Log file
0x00020000131072Start errors are written to the event log.
0x00020002131074Start errors are written to the event log.Start errors are written to the log file.
0x0002001A131098Start errors are written to the event log.Start errors are written to the log file. MDO entries and exits are written to the log file.
0x0000001F31All events are written to the log file.
0x000000022Start failures are written to the log file.
0x0000001A26Start failures and MDO activity are written to the log file.
0x001A001A1703962Start failures and MDO activity are written to the event log.Start failures and MDO activity are written to the log file.
0x00020001131073Start failures are written to the event log.Start successes are written to the log file.
0x0000001824MDO activity is written to the log file.
0x001000001048576When an application goes MDO, an informational message is written to the event log.

Description of the information in the log

The log file contains one record per line. Each record contains five fields. These fields are separated by single tab characters. The fields contain a time stamp, the user name, the computer name, the application name, and an event.

The application name is the NAME attribute and the VERSION attribute from the SOFTPKG element in the .osd file of the application.

The event field contains the following terms:
  • Launched: This term indicates a successful start.
  • Error "code": This term indicates a failed start. In this term, "code" is a placeholder for the 22-digit Softricity error code.
  • Shut down: This term indicates an application shutdown.
  • Disconnected: This term indicates that an application entered MDO mode.
  • Reconnected: This term indicates that an application left MDO mode.

Messages that are recorded in the log

The event log records the following messages:
  • The date
  • The time
  • The user name if the user is logged in to a domain account instead of to a local account
  • The computer name
  • The error source (This will always be “SoftGrid Client” for these messages.)
The user name will also be added to the body of the messages that SFTTray.exe generates for those cases in which users are not logged in to a domain. This occurs even though this process is redundant when the users are logged in to a domain.

These five messages have the following types and formats:
  • Informational: User user started SoftGrid application application name and version.
  • Error: The SoftGrid application application name and version failed to launch for user user with error 22-digit error code.
  • Informational: User user shut down SoftGrid application application name and version.
  • Informational: User user entered disconnected mode for application name and version.
  • Informational: User user left disconnected mode for application name and version.
Generally, it is a bad practice to write messages to the event log for frequent events, such as successful starts. The functionality is included for completeness and because it may be useful in some debugging situations. However, it should be a very rare occurrence to log anything other than start failures to the event log.

Be aware that for some errors, the name of the application is unknown. This condition can occur if the error occurs before the client core can open the .osd file, can parse the application name, and can return the application name to SFTTray.exe.

In this case, the application name in the log is replaced by the parameter that was passed to SFTTray.exe on the command line. This parameter can be one of the following items:
  • An .osd path
  • The path of a document that is to be opened (for a file type association)
  • The name and version of the application (for a published shortcut)
This means that most of the time, the name and the version of the application appear in the log. However, sometimes this will not be true. In these cases, the path of an .osd file or of a document appears instead.

Someone who reviews the log must manually use the same algorithm that the client uses to figure out what application was being started. If the application is an .osd file, the reviewer must open the file and see what name or version is in the file. If the application is a document, the reviewer must determine what application is associated with files of that type.

Note Only applications that are managed by SFTTray.exe cause events to be written to the log file or to the event log. Starts that SFTRun.exe performs are not logged. No changes will be made to the installer to let this feature be enabled or disabled at installation time.

Because the log is generated by SFTTray.exe, the log contains exactly what a user sees for starts and failures. This is unlike the client log. In the client log, some failures do not appear because SFTTray.exe cannot connect to the listener service to report the failures.

A typical log resembles the following log.
01/23/2004 18:19:03.142 username computername Microsoft Word 2000 Launched
01/23/2004 18:21:10.784 username computername Microsoft Word 2000 Disconnected
01/23/2004 18:31:10.927 username computername Microsoft Word 2000 Reconnected
01/23/2004 18:33:42.873 username computername Microsoft Word 2000 Shut down
01/23/2004 18:33:46.013 username computername Microsoft Excel 2000 Error 300210-03209403-00004004

Event IDs that are recorded in the log

Collapse this tableExpand this table
Event IDTypeDescription
2001InformationalThe SoftGrid Core Service started.
2002InformationalThe SoftGrid Core Service stopped.
2003WarningWarning An attempt to shut down the SoftGrid Core Service failed because users are still connected.
2004ErrorThe SoftGrid Core Service could not start because no valid license was available.
2005ErrorThe SoftGrid Core Service could not contact the Service Control Dispatcher.
2006ErrorThe SoftGrid Core Service could not register its service control handler.
2007ErrorThe SoftGrid Core Service failed to initialize correctly.
2008ErrorThe SoftGrid Core Service could not start due to a COM initialization error.
2009ErrorThe SoftGrid Core Service could not start because a driver failed in a previous run.
2010ErrorThe SoftGrid Core Service could not start because a driver failed to respond.
2011ErrorThe SoftGrid Core Service could not start because the Application Manager did not initialize.
2012ErrorThe SoftGrid application '%1' failed to launch for user %2 with error %3.
2013InformationalUser %1 launched SoftGrid application '%2'.
2014InformationalUser %1 shut down SoftGrid application '%2'.
2015InformationalUser %1 entered disconnected mode for '%2'.
2016InformationalUser %1 left disconnected mode for '%2'.

Properties

Article ID: 931252 - Last Review: February 21, 2009 - Revision: 4.0
APPLIES TO
  • Microsoft Application Virtualization for Terminal Services
  • Microsoft Application Virtualization for Windows Desktops
Keywords: 
kbexpertiseinter kbhowto KB931252

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com