Is Sprint/TeleNav tracking your destinations?

August 6, 2011 Leave a comment

I was playing around with my new Windows Phone 7 device (HTC Arrive) yesterday and decided to launch TeleNav to check it out.  Well, truthfully, I was lost and needed to find my way home:).  Anyway, I accidentally clicked on “recent places”, and to my surprise, I found addresses I had mapped going back several months – on my previous phone – an Android phone.  I purchased the HTC Arrive less than a week ago and this was the first time I was mapping an address with TeleNav. I remember that I had to enter my mobile number the first time I ran the application, but I thought it was just to register the device.  It appears that was also linking it to a store of my previous destinations – and who knows what else.  I don’t mind caching previous destinations on the device itself, but storing it on some Sprint/TeleNav server bothers me.  Feels like a privacy violation if that information can be used to track where I’ve been.

BTW, I am really liking WP7 and the HTC Arrive.  I am at the evening of my second day without charging the battery.  I have used voice, data (3G and WiFi) and navigation both days, and the battery is still going. My previous phone – Epic 4G (Samsung Galaxy S – Android) could barely run 12 hours with the same sync settings.

Categories: Misc Tags: , ,

Related Incident and Problem closure workflow Activities

May 1, 2011 3 comments

This library I wrote contains 3 custom workflow activities for closing related Incidents on Problems and Change Requests, or related Problems on Change Requests:

· Problem_CloseRelatedIncidents – Use to close Incidents Related to a Problem

· ChangeRequest_CloseRelatedIncidents – Use to close Incidents Related to a Change Request

· ChangeRequest_CloseRelatedProblems – Use to close Problems related to a Change Request

The activities can be used in a workflow created with the Service Manager Authoring Tool. The behavior of each activity is as described above, with exception of the ChangeRequest_CloseRelatedIncidents activity which is overreaching and will close not only Incidents directly related to the Change Request but also Incidents related to Problems which are related to the Change Request. I probably should have made the overreaching behavior optional, but oh well… it is what it is for now.

Making the Activities available in the Authoring Tool

  1. Copy the library – RelatedIncidentClosure.WorkflowAuthoring.ActivityLibrary.dll – to “C:\Program Files (x86)\Microsoft System Center\Service Manager 2010 Authoring\Workflow Activity Library” on a computer where the Authoring Tool is installed.
  2. Run the Authoring Tool.
  3. Click on View | Activities Toolbox.
  4. In the Activities Toolbox window,
  • If you do not already have a group for custom activities, right-click on the ‘Activities Group’ node (the top most) and select ‘New Group’. Specify a name for the new group.

  • Right-click on your custom activities group and select ‘Choose Activities…’

  • On the ‘Choose Activities for a Group’ popup, click the ‘Add Custom Activities…’ button.

  • On the ‘Select Custom Activity Assembly’ popup, you should see ‘RelatedIncidentClosure.WorkflowAuthoring.ActivityLibrary’. Select it and click Open.

  • Back on the Choose Activities for a Group popup, check the 3 activities in the library and click OK.

  • Back in the Activities Toolbox, the activities will be visible and available for use

Sample use of an Activity

For this example, I’ll create a workflow that is triggered when a Change Requests status changes to Closed.  We will use the  ChangeRequest_CloseRelatedIncidents activity to automatically
close all incidents related to the change request, specifying a resolution

1. Run the Authoring Tool and create a workflow. I am not including details on creating the workflow because there is nothing different so far. You should end up with an empty sequential workflow with no activities.

2. From your custom activities group, drag ChangeRequest_CloseRelatedIncidents to the drop area of the sequential workflow.

3. The red exclamation icon is a validation check indicating that a required value is missing. With the Activity selected, specify the following values in the Details Window (if the Details Window is not visible, select it from the View menu of the Authoring Tool)

a. ChangeRequestId:Click the ellipsis button next to the value field. In the popup window, select ‘Use a class property’ and select the ‘ID (internal)’ property.

b. IncidentResolutionCategoryId: This is an optional value. If specified, the resolution category will be set on the incident when it is closed. This value needs to be the EnumTypeId of the resolution category. For example, the EnumTypeId of “Fixed by Analyst” incident resolution is: C5F6ADA9-A0DF-01D6-7087-6B8500CA6C2B
For a query on how to get the EnumTypeId, see my blog post:
Quick Enum from database query.

4. Compile the workflow by clicking ‘File | Save All’ in the Authoring Tool.

5. Copy the management pack .dll generated by the Authoring Tool and RelatedIncidentClosure.WorkflowAuthoring.ActivityLibrary.dll to “\Program Files\Microsoft System Center\Service Manager 2010” on your Service Manager Server

6. Import the management pack XML and test the workflow.

Download the library

Tool for editing Service Manager view column names

April 2, 2011 9 comments

I recently had to change several view column names (in multiple views), in the Service Manager console.  Travis Wright has a post on the system center blog on how to do this (  The process is however tedious and error prone when you have to do it for multiple views or view columns.  Since I am lazy at repetitive tasks, I decided to write a quick tool to do the work for me.  In the tool, you specify the internal column name – e.g. ‘AffectedUser.DisplayName’ and the display string you would like to use for the column name – e.g. ‘Affected User’ (instead of the default ‘Display Name’).  The tool searches the exported management pack XML for all instances of that internal column name, and replaces the corresponding display value of the selected language with the string you specified.

Here’s how to run the tool:

  1. Export the Management Pack
  2. Launch the tool.  At startup, the tool contains two suggested (what I think are the most common) column renames.  You can delete the rows if you don’t need to rename those columns, or edit the Display String.  You can also add additional columns to rename.  Note that you must know the internal column name.  These are in each view node under ‘Presentation\Columns\mux:ColumnCollection’.
  3. You can optionally change the language pack to modify at the top right of the tool.  **Note that I have tested the tool only with ENU.
  4. Click the Open icon and open the exported Management Pack XML
  5. Click the Save icon to make the changes and save the file.  The file is first backed up to <mpFileName>.<YearMonthDateTime>.xml before being modified.
  6. Exit the tool.  If you are really paranoid (and I don’t blame you for being -:)), use windiff or another text comparer to compare the backed up and the current file.
  7. Import the modified Management Pack XML, and restart the System Center Management service.

The tool executable (in and the VS2010 solution ( are available here.

Quick Enum from database query

March 5, 2011 1 comment

If you want to quickly get the enumeration of a display string, you can run the following query on the ServiceManager database

select enum.EnumTypeId, enum.EnumTypeName, disp.DisplayName,
mp.MPName, mp.MPFriendlyName
from EnumType enum
join DisplayStringView disp on enum.EnumTypeName = disp.ElementName
join ManagementPack mp on enum.ManagementPackId = mp.ManagementPackId
where disp.LanguageCode='ENU'
and DisplayName = 'xxx'

Where ‘xxx’ is the display name such as ‘Auto Resolved by Problem’.  The above query of course is for English display strings.  You can replace ‘ENU’ with the language code of any other supported language.

Service Manager Enums, Classes and Relationship classes

March 5, 2011 Leave a comment

If you’ve had to use the CSV connector to import data and needed to know the enums for your list entries, or if you have manually authored a Management Pack and needed to know what classes or relationship classes to use, these tools may be helpful.  They retrieve the enums, classes and relationship classes for all management packs in your Service Manager database.

I have attached the VS 2008 project files if you are interested in the code.  For the executable, simply go to the <Project>\bin\debug folder.  All three executables have the same command line parameters:

-s <ManagementServer> [-d <domain> -u <username> -p <password>]

The -d -u -p parameters are required only if you are running the executable with non privileged or non trusted domain/workgroup account.

I suggest redirecting the output to a csv file because the data is comma delimited, with column headers.  E.g. executable.exe > output.csv


The executable (SMEnums.exe) produces these comma separated columns:
EnumName, EnumId, EnumDisplayName, EnumParentId, MPName, MPDisplayName, MPId, MPKeyToken, MPVersion


The executable (SMClasses.exe) produces these comma separated columns:
ClassId, ClassName, ClassDisplayName, MPName, MPDisplayName, MPVersion, MPKeyToken

Relationship Classes

The executable (SMRelClasses.exe) produces these comma separated columns:
ClassId, ClassName, ClassDisplayName, MPName, MPDisplayName, MPVersion, MPKeyToken

Categories: Service Manager Tags: ,

Processing e-mail from unresolved (external) senders

February 23, 2011 2 comments

You probably already know that Service Manager will discard e-mail from senders it does not recognize, into the BadMail folder.  If you are not monitoring this folder, you could miss incident requests from users who occasionally, for one reason or another, send e-mail from their personal/home e-mail address rather than their corporate Active Directory linked e-mail address.  The solution described here is one I developed and implemented with a client in December 2010.  It eliminates the need to monitor the BadMail folder, and automatically creates incidents of all e-mails discarded by Service Manager.

The External Mail Processor Service

The External Mail Processor Service is a Windows service that can run on any computer with the .Net framework 3.5 or higher.  The only security requirements are that the service account have access to Service Manager’s BadMail folder, and be able to create incidents in Service Manager.

The External Mail Processor service works by monitoring the BadMail folder with a file system watcher.  When Service Manager discards an incident e-mail file (.eml) into the BadMail folder, the service detects and immediately processes the file.  An incident is created of the e-mail just as Service Manager would.  The e-mail subject becomes the incident title, the first 4000 characters of  the body body become the incident description, and the .eml file itself is added as an attachment to the incident.  One notable difference is that the senders e-mail address is added as the Alternate Contact Method of the incident, rather than as the Affected User.  The service also enables ignoring e-mails based on senders address or subject.

Configuring and Installing the Service

Download and extract the file to a computer running the .Net framework 3.5.  The zip file includes the following files:

  • SMExtMailProcessor.exe
  • SMExtMailProcessor.exe.config
  • Microsoft.EnterpriseManagement.ServiceManager.dll
  • Microsoft.EnterpriseManagement.Packaging.dll
  • Interop.CDO.dll
  • Interop.ADODB.dll

Using a text or XML editor, open SMExtMailProcessor.exe.config to customize the settings.  There are two kinds or settings.  Single value settings such as

            <setting name="BadMailFolder" serializeAs="String">

which take a single value and multi-value settings such as

            <setting name="IgnoreSenders" serializeAs="Xml">
                    <ArrayOfString xmlns:xsi=""

which can have multiple values each surrounded by a <string></string> tag.

The settings to be customized are:

  • BadMailFolder: Single value. The location of Service Manager’s BadMail folder.  This can be a local path or a UNC.  Verify that the service account has the necessary NTFS and/or share permissions.
  • ProcessedFolder: Single value. You need to create this folder.  All processed .eml files will be placed into this folder *if* the DeleteAfterProcessing setting is set to False.
  • IgnoreSenders: Multiple values.  List of e-mail address to ignore (not create incidents).  A ‘contains’ comparison of these values to the senders e-mail address is performed, so you can specify partial strings here – such as just the domain name if you want to ignore an entire domain.
  • IgnoreSubjects: Multiple values.  List of e-mail subjects to ignore.  This is also a ‘contains’ comparison.
  • IncidentIDPrefix: Single value.  A prefix for incidents created.  This is typically IR.
  • IncidentSubjectPrefix: Single value.  Optional.  A string to prefix the Title of each incident.
  • DeleteAfterProcessing: Single value. Set this value to True if you want the .eml files deleted after they are processed.  If you set it to False, the files will be moved to the ProcessedFolder after processing.
  • ManagementServer: Single value.  The Service Manager management server.  If you run this service on the Service Manager server, leave this value as localhost.
  • Verbose: Single value.  Set to False unless when troubleshooting.

After modifying the .config file, you need to install the service. The service needs to run with a domain account.  The account must have permissions to read, write and delete in the BadMailFolder and ProcessedFolder folders specified in the .config file, and must have permissions in Service Manager to create incidents. 

To install the service, open an elevated command prompt at the folder with the extracted files and run:

\Windows\Microsoft.NET\Framework64\v2.0.50727\InstallUtil.exe SMExtMailProcessor.exe

The assembly installer will prompt you to specify a service login and password.  The installation is logged to InstallUtil.InstallLog in the same folder, which can be opened with notepad.  After successful installation, you can start the service using Services.msc.  The service name is “Service Manager External Mail Processor”. 

The service logs to the Windows application event log, event source ‘SMExtMailProcessor’.

Uninstalling the Service

Open an elevated command prompt at the folder with the service executable and run:

\Windows\Microsoft.NET\Framework64\v2.0.50727\InstallUtil.exe /u SMExtMailProcessor.exe

Service Manager E-mail pre-processor Service

February 14, 2011 4 comments

In early November 2010, a good two months before the Service Manager Exchange Connector was released, I needed to provide an incident e-mail handling solution for a client.  I looked at and was inspired by Anders Bengstsson solution but wanted something more robust, so I decided to write a Windows service that uses file system watchers and multiple worker threads.

So why post this now after the Service Manager Exchange connector has been released?  Well, because someone out there might find it useful – someone who maybe doesn’t use Exchange (gasp 🙂 )or uses a version of exchange prior to Exchange 2007, or maybe even just wants a quite simple solution.

The Service Manager E-mail Pre-processor service works by intercepting SMTP mail before it gets to Service Manager.  The .eml files are properly parsed using Collaborative Data Objects (CDO) for Windows and the subject line is further parsed for incident tokens.  If incident tokens are present, the incident ID is parsed and used to update the incident.  The first 4000 characters of the email body are added as a comment to the incident, and the eml file is added as an attachment.  If incident tokens are not present, the e-mail is moved into another folder from which Service Manager reads.

Configuring and Installing the Service

The Service Manager E-mail pre-processor service can be installed and run from any Windows computer running The .Net 3.5 framework.

Download the file, which contains the following files

  • SMEmailPreProcessor.exe
  • SMEmailPreProcessor.exe.config
  • Microsoft.EnterpriseManagement.ServiceManager.dll
  • Microsoft.EnterpriseManagement.Packaging.dll
  • Interop.CDO.dll
  • Interop.ADODB.dll

Extract all files into the same folder.  Using a text or XML editor, open SMEmailPreProcessor.exe.config and edit the settings under the <SMEmailPreprocessor.Properties.Settings> node.  Each setting name is shown as

<setting name=”Setting_NameserializeAs=”string”> and the settings value is within the <value> </value> tags.

The settings are:

  • DropFolder”: This is the SMTP drop folder for the Service Manager SMTP domain.  This like other settings folders can be a local or UNC path
  • NewIncidentFolder”: This is a new folder you need to create.  After parsing each .eml file, if the service determines that the e-mail is not an incident reply e-mail, the .eml file is moved into this folder to be picked up by Service Manager.  Note that you must edit Incident Incoming E-Mail settings in Service Manager to specify this folder as the SMTP Drop folder, rather than the default drop folder above.
  • IncidentTokenStart“: This token denotes the start of the incident ID in the e-mail subject line.  Any characters after this start token and before the end token (below) will be read as the incident ID.  The start token can be one or more characters.  Be sure to use unique characters that would typically not be used in an e-mail subject.
  • IncidentTokenEnd“:  This token denotes the end of the incident ID in the e-mail subject line.  If you use the sample start token of [# and the sample end token of ] , the incident ID in the subject line would be something like [#IR3612] where the incident ID is IR3612.
  • IncidentComment“:  You generally want to leave the value for this setting blank.  Any value you specify here will be used instead of the e-mail body as the incident comment.
  • BadMailFolder“:  Where to place .eml files that could not be processed.
  • ManagementServer“:  The Service Manager management server name.  If the service runs locally on the management server, leave the value as localhost.
  • Verbose“:  Leave this value set to False.  Make it True only if you are troubleshooting a problem.


After modifying the .config file, you need to install the service. The service needs to run with a domain account.  The account must have permissions to read & write to the SMTP folders specified in the .config file, and must have Incident Resolver permissions in Service Manager.  To install the service, open an elevated command prompt at the folder with the extracted files and run:

\Windows\Microsoft.NET\Framework64\v2.0.50727\InstallUtil.exe SMEmailPreProcessor.exe

The assembly installer will prompt you to specify a service login and password.  The installation is logged to InstallUtil.InstallLog in the same folder.  The file can be opened with notepad.  After successful installation, you can start the service using Services.msc.  The service name is “SM Email Preprocessor”. 

Remember that before starting the service, you must change the Service Manager Incident Incoming E-Mail settings to the value specified as the “NewIncidentFoder”.

The service logs to the Windows application event log, event source ‘SMEmailPreprocessor’.


Uninstalling the Service

Open an elevated command prompt at the folder with the service executable and run:

\Windows\Microsoft.NET\Framework64\v2.0.50727\InstallUtil.exe /u SMEmailPreProcessor.exe

You’d then want to restore the Service Manager Incident Incoming E-Mail settings to the default SMTP drop folder.

Categories: Service Manager