RCCT– Command line configuration for Service Accounts, IIS Pools and vDirs and Service Account Membership…

by Andy Grogan on May 17, 2013 · 0 comments

in Exchange Programming .NET, Microsoft Visual Studio, Windows 2008 (IIS)

So as some of you will know I have been working on a number of programming projects over the last few years. Admittedly some are better than others – but the one thing that has always bothered me is how I can provide a better setup and configuration experience for my readers.

Most of my tools are pretty simple in terms of their installation – however there are a few which I have authored that have required a more involved setup process – usually I have handled this through user guides with step by step screen shots – or videos that I have published via my YouTube channel.

The ideal scenario would be for me to deploy my software via MSI using tools such as Install Shield, Install Aware – or my personal favourite – Advanced Installer.

It is important to note that all of these tools contain features which automate the following tasks during setup:

  • Registering Services.
  • Creating Application Pools in IIS.
  • Creating Virtual Directories in IIS.
  • Creating Service Account in Active Directory.
  • Changing Group Membership.

However the above tends to be contained within the higher level “paid” versions which tend to be very expensive (for a single ad-hoc amateur developer like myself).

So with the above in mind, I decided to write a simple and small tool (which is probably of more interest to developers, rather than Exchange folks) which when combined with a purpose built setup tool (more on this below) – automates the creation and modification of the above.

This article will focus on the RCCT and how it can be used with Advanced Installer – you might be asking why I like Advanced Installer above setup studios? – well there are a few reasons – but the main two are:

  • Advanced Installer has a completely free edition which allows for a process to be launched post install with Parameters (why I like this will become apparent very soon).
  • Advanced Installer is very easy to use.

Other main tools (such as Install Shield or Install Aware) whilst being exceptionally powerful – do not offer a free version for non-profit use.

By combining the RCCT tool with Advanced Installer – I can package my software up into an MSI – and then execute a program at the end of the install with a number of parameters which gives me the following functionality of the “paid for” version.

  • Basic IIS Configuration (creating Application Pools, Virtual Directories, assigning Virtual Directories to Application Pools).
  • Creation of Accounts and modifying group membership in AD.

You can also use the RCCT as a stand alone command line tool.

Download

17-05-201312-57-03[ RCCT Tool – 38KB ]

Using the RCCT – Stand Alone

The RCCT expects the following mandatory command line arguments:

RCCT.exe <Service Account Name> <Service Account Password> <Service Account Description> <IIS Application Pool Metabase Path> <Application Pool Name> <IIS Virtual Directory Metabase Path> <Physical IIS Root Directory Path>

17-05-201310-54-48

The command line example below will complete the following tasks:

  • Create a user calls “svc_Test” in Active Directory.
  • Set the password to “Password1”.
  • Set the description on the AD account to “Demo Service Account” .
  • Create an Application Pool called “ap_TestAppPool” within IIS.
  • Create a virtual directory called “test_VDir” within the first website (determined by the IIS path provided) give it a physical path of “T:\testDir” and then assign the “ap_TestAppPool” to the virtual directory (making it an application).
RCCT.exe "svc_Test" "Password1" "Demo Service Account" "IIS://Localhost/W3SVC/AppPools" "ap_TestAppPool" "IIS://Localhost/W3SVC/1/Root" "test_vDir" "t:\TestDir"

There are some default actions that the tool also performs on the Virtual Directory:

  • Sets the default page to “default.aspx”.
  • Sets the default Security to NTLM.

These options are not configurable in this version.

The output from the above command looks like the following example:

17-05-201311-03-14

The RCCT also accepts a final optional parameter which is a Windows Active Directory Group that you like to add the service account into. in the example below I have changed the command line to add the service account into the Domain Admins group:

RCCT.exe "svc_Test" "Password1" "Demo Service Account" "IIS://Localhost/W3SVC/AppPools" "ap_TestAppPool" "IIS://Localhost/W3SVC/1/Root" "test_vDir" "t:\TestDir" “Domain Admins”

17-05-201311-04-45

You will see at the bottom of the screen shot above the following message:

GROUP DN PASSED: CN=Domain Admins

Using the RCCT – with Advanced Installer

Advanced Installer is provided by Caphyon and comes in five versions:

  • Freeware
  • Architect
  • Enterprise
  • For Java
  • Professional

Naturally I make use of the free version. You can use the RCCT in conjunction with the [ Exit dialog –> After Finishing Actions –>Launch Application ] options – see below.

17-05-201311-08-15

I hope that someone out there finds this useful – and I welcome any feedback or suggestions.

Social

{ 0 comments… add one now }

Leave a Comment

Previous post:

Next post: