My Writings. My Thoughts.

Neat tricks with CMD.EXE!

// August 12th, 2007 // .Net, Troublesolving

I recently needed to debug a service that run as the LocalSystem user. I was getting some strange errors and I suspected that user access rights was the culprit. I needed to be able to run some commands as the LocalSystem user through a shell (cmd.exe). I tried the most obvious solution, which to me was to use the “Run As…” command, but this didn’t work since the LocalSystem account can’t be used in this fashion. I found the solution in this blog post.

Be aware that the trick doesn’t work if you are connected to another computer through Remote Desktop! The CMD.EXE will be spawned at the local screen but not on your RDP connection.

No TweetBacks yet. (Be the first to Tweet this post)

Leave a Reply