Menu

Skip to primary content
  • Home
  • About
  • Curriculum Vitae
  • Development
  • Links
    • My Photo Blog
    • My Flickr Sets
    • Self-Defence Dublin
  • Contact

try { } catch { } me

Eoin Campbell's Coding Blog… (mostly)

Tagged with Windows

Checking if a user account is enabled in .NET

Here's a handy little code snippet to figure out if a local windows user account is enabled or not using the System.DirectoryServices namespace.   private static bool IsUserAccountEnabled(string username) { try { var result = new DirectoryEntry { Path = "WinNT://" + … Continue reading →
September 7, 2012 Leave a reply

InstallUtil, Windows Services & ProjectInstallers with App.Config Settings

We had a situation in work where we needed to make service installation a more configurable process. So a very simple example, In order to install a .NET Windows Service we need to provide it with a username & password that the services will run as. We can either provide that information at … Continue reading →
October 12, 2010 8 Replies
View Full Site
Proudly powered by WordPress