Gosh time flies. I haven’t written much for a very long time. Back in early 2007 I was writing almost every day. Not so much these days. I have been working on a new product, which will be announced later this year.. Our company, forProject Technologies, has been pushing very hard on it for almost 2.5 years. It will be a big deal, for me anyway, when we launch.
That work consumes the bulk of work time, the rest of my time is spent with my family except for a small sliver of hobby time. Over the past three years I have managed to create a few tools, some of which I am the only user while others are used internally by my company and by some friends. By the end of the summer, I hope to have these tools released on a new website I am working on, which will be announced soon as well. I think some of them may be available on my company’s site as well, but we haven’t worked that out yet.
The new website is another hobby project that is important to me not because I think the site is going to draw much traffic, but because I really need to learn some of the newest web development technologies. I spend most of my time working on backend services and Windows applications. So, the new website is where I am learning advanced java script techniques, compliant HTML/CSS (I use Expression Web, which is pretty nice), and ajax using Microsoft's ajax client library with ajax-enabled WCF web services. Pretty fun really, event if java script drives me a little bonkers sometimes.
Okay, so what I am going to do in this post is explain what each of these tools do and why I created them. First, my development environment is Visual Studio 2010 SP1 in C#, Expression 4.0, IIS 7.0 (hosted by these very cool folks), Team Foundation Server 2011 (also hosted by these very cool folks), SQL Server 2008 (hosted by…you guessed it), and TopStyle. TopStyle, by the way, has the best CSS editing environment I have encountered. And, as I was getting ready to do some screenshots for this blog, I found Sizer, which is kind of handy.
I haven’t moved to .NET 4.0 yet because some of my stuff has dependencies on SharePoint, which is not .NET 4.0 ready yet.
In no particular order… Let’s start with Queue and Performance Monitor for Project Server:
Queue and Performance Monitor for Project Server 2007/2010
I have been working with Microsoft Project since 1996, including building quite a few products around it. In fact, that is my work currently. One of the things I did recently was build a stress/performance suite for Project Server. It involves a lot of queue operations, obviously, and the SharePoint queue viewer isn’t sufficient. So…I wrote my own.
It also supports ULS log viewing, including tracking a failed queue job’s ULS records:
Including export of performance information:
Set thresholds and events:
Export chart to various formats:
And plenty of options:
The Windows server MMC snapin for service management is okay but not great. I wanted a tool that would give me more advanced information about services, plus the ability to create a “profile” of services that I could stop and start in bulk. Why is this useful? Well, there a great many services that are configured to run that aren’t really necessary much of the time. So, by being able to turn these off I can get a little more performance out of my machines when writing some of my server applications.
You can see the basic features in the screen shot above:
- A list of all installed services on the local machine or a remote machine with basic information in the grid
- A more comprehensive list of properties about the service
- A list of all services the service depends upon
- A list of all dependent services
- And the list of required privileges the server requires to run
So I got to dig deeper into the service control API and even deeper into NT Services in general because some of these properties are not exposed through the BCL. But, the real fun came when I started working on the service profile feature. Here is s screenshot of the ribbon page for this feature:
The gallery on the left is just a list of all of the profiles defined. A profile is simply a set of services that I either want to start, stop, or a combination of the two in a single operation: Here is an example where I am turning off all services not required to run the OS, SharePoint, and Project Server:
When I click the Apply button, all of the selected services are put into the required state. When I apply a service profile, I have the option of creating a “restore point”, which is a record of all the services running before I applied the service profile. I can restore to that state by clicking the Restore button.
Pretty handy, with more services stuff to come later.
A Note on All New Tools
As I was writing about Service Manager it occurred to me that there are several characteristics and feature of all the tools I have written recently (Event Viewer/Service Manager – the rest I will retrofit to this paradigm):
- They all employ the ribbon user interface, including the “backstage” concept.
- They all have automatic update capability
- They all have a feedback mechanism
- And a shared “About” framework
Here are some screens
And you can check for updates as well:
Okay, back to the tools…
The Windows event viewer MMC snapin is pretty great, but I wanted it is lacking a few features. On particular, I would like to be able to search for key words (or multiple key words) across multiple log files… So, here is Event Viewer:
Here are the features:
- A list of all the available logs on the local machine or a remote machine
- The ability to open a saved or exported log
- Color coded event types
- Ability to copy to the clipboard
- Advanced and basic search (more on this in a minute)
None of the first four features are particularly interesting but needed just to hit the bare minimum feature set. The real useful features are search.
Along the left is a checkable tree control. I check the logs I want to search, put in my keywords (separated by a ‘,’) and click search. The engine looks through all of the checked logs and presents you the search results. In the message pane at the bottom there is also a search box, which supports incremental search (like F3 in Visual Studio).
One last feature is the engine looks at each message when you click it to see if it is HTML (a lot of our events are formatted for display in a forum other than the event viewer). If HTML is detected, the engine will render the HTML:
QuickPatch is a software servicing system I started writing back in 2007. First you define your patch, which can include replacing files, updating SharePoint solutions, running database scripts, plus a more advanced file placement feature that I will discuss elsewhere:
Configure various options, including using a “registry hint” that tells the patch application where to start looking for files to update:
Then you build the patch:
You end up with two files:
Setup is the bootstrapper and package.exe is the patch. When run, the patch applying application looks like this:
After years of using Mark Russinovich’s debug viewer, I decided I wanted to build my own with a few more features plus do it all in .NET. Fortunately, Microsoft provides a managed debug API, which you can download here. This was started before I moved to the ribbon UI. Eventually I will return to this and update it.
- In 1.0, intercept .NET debug stream (in a subsequent release I will enable native as well)
- Include and exclude filters
- Buffer tracking (I have left Mark’s Debug Viewer up on a server and drained all memory because the number of messages was like 1.5 million)
- Message recording
- This allows you to turn on an engine that will record all of the debug messages to a file
- You can either replay the session or export it
- An advanced capture/highlighter (not done yet)
Sfx Creator (Self-extracting executable generator)
There are quite a few self-extracting executable tools out there but I wanted my own so I wrote one:
Here are the features:
- Create a self-extracting executable engine in pure .NET
- All for the user to define an “Sfx” project, which includes all of the files, prompt, options, whatever so it can be used again later.
- All for both plain text and HTML in the prompt.
- All the user to specify an executable to run after extraction
- All of the user to (optionally) allow for a target directory to be selected by the user at extraction (if not, it is extracted to a temp directory, the after-extraction executable is run, then everything gets clean up)
If isn’t a silent, extract, run type of project, the user sees this (with sample HTML prompt content):
And then the files are extracted…
Not trying to reinvent the wheel here but I must say that some of the system tools from Microsoft are seriously Soviet looking and I prefer nicer look-and-feel so… Here is my Registry Viewer:
The best thing is the search feature:
C# Header Designer
This tool allows you to define a header for your C# source files and apply it to individual files, directories of files, or you can simply select a Visual Studio solution or project and the tool figures out what files to apply it to. Here is the user guide for more information.
Project settings page: