Often when working with Windows services, I've wanted to have the ability to log in as the LocalSystem user in order to try to diagnose problems. For example, one recent problem that I was experiencing is on ccnetlive we run CruiseControl.NET as a Windows service under the LocalSystem account. The problem was that when accessing a Subversion repository over SSL, you are required to accept the certificate from the remote host. Accepting the certificate requires responding to a command-line prompt. Once accepted, this certificate can then be cached permanently, so it is not necessary to re-accept the certificate -- at least until it expires. Unfortunately, there is no way to log in directly as the LocalSystem user -- so the runas command will not work. In trying to find a solution to this problem, I came across a very useful blog post that describes creating a Windows service that simply opens a new command shell. As Windows services, by default, run under the LocalSystem account, this command shell window is open under the LocalSystem account.
One of the less enjoyable things about Subversion is that it is quite picky about linefeed consistency in committed files. Are you using CRLF or just LF? Personally I don't really care as most editors can handle this. I'm sure that there is a perfectly good reason for Subversion's enforcing this, but it is a hassle when you have a bunch of modifications to process and the commit keeps failing part way through telling you that yet another file is inconsistent. I came across a little free utility called
ToFroWin CR/LF converter that has saved me hours of tedious effort to ensure that line feeds are set consistently for a set of files. It plugs into Windows Explorer allowing you to easily convert selected files back and forth between different linefeed formats.