Product DemonstrationRequest More Information

Wednesday, November 21, 2007

Active Directory to the Rescue

We're wrapping up the 3.3.0.0 release of Enterprise Instant Messenger and I wanted to share some knowledge I gained about Active Directory while looking in to how an organization might deploy the new client to hundreds of computers.

Some history: For the first release in some cases, admins went around to each machine and stepped through the client installer. Passageways employees even helped out in this process for some of the larger jobs. While I do love talking to and spending time with our outstanding customers, I'm very glad I wasn't around back then. I myself have worked almost exclusively in the web world for a while and I am not a network administrator so I have never really had to worry about how new applications get distributed inside an organization. That being said, if this article seems rudimentary I apologize, but hopefully it will offer some value to some of the folks out there.

Here at Passageways I was working with a network admin who had set up a group policy to run a VB Script file when a user logged in. This file essentially took a copy of the installed client folder, and copied it to each computer on the network. This got us most of the way there, so I added a few lines to install the registry keys, make a shortcut on the desktop, and moved the variables an admin may wish to change to the top where they're easier to see. Great!

The downside to this first option is that the installer never gets run, so there isn't an entry in the Add/Remove Programs list under the control panel, so removing the EIM Client it is a manual task. Our Dev Lead, Matt, then pointed me at msiexec. Msiexec is a command line utility that will run an MSI file. Our client installer happens to be a glorified MSI file, so this works well. Using this method is our best practice since it will ensure that users have the latest version of the EIM Client. In fact, we plan to ship the EIM server with a batch file for your use with the following line in it:
msiexec /i "\\network\path\to\eim.msi" EIM_INPUT_SERVERNAMEORIP="MyEimServer" EIM_INPUT_STANDARDPORT=1111 EIM_INPUT_TRUSTEDPORT=2222 EIM_INPUT_USETRUSTEDPORT=true INSTALLDIR="%PROGRAMFILES%\Passageways\Enterprise Instant Messenger" ALLUSERS="" /qn


This line installs the Client to the Program Files directory using ports 1111, 2222, and the server of MyEimServer. It does this even for users who do not have admin rights to their machine, and the /qn option means it does it behind the scenes without the user ever having to lift a finger.

Now there's still one more option combining the power of msiexec and Active Directory that may be of interest to you. AD lets you "Publish" installers through the Add/Remove Programs console under the Add New Programs section. To do so, you'll want to first transform the MSI, effectively modifying the MSI with the properties we set when calling msiexec above. Then, once you've got an MSI customized for your organization, follow these steps to publish the installer to your users (steps modified from Visio Deployment):
  • On the Start menu, point to Programs, point to Administrative Tools, and then click Active Directory Users and Computers.
  • In the console tree, right-click the domain or organizational unit for which you want to set the Group Policy.
  • Click Properties, and then click the Group Policy tab.
  • Under Computer Configuration or User Configuration, open Software Settings.
  • Right-click the Software Installation node, and then click Properties.
  • In the Software Installation Properties dialog box, click the General tab, and then browse to the location of transformed installer you've created.
  • In the New Packages section, select Publish.
  • This specifies that when you add the MSI, by default you want it published with standard package properties.
  • In the Installation User Interface Options section, specify what level of information the user will see during installation. Select one of the following options:
    • Basic: Displays minimal information when users install the EIM Client. This installs the client in unattended mode and requires no user interface. This setting corresponds to the /qb- command line option of msiexec.
    • Maximum: Displays all installation messages and screens during the installation of the EIM Client.
  • Click OK.

The end result is that when your users log off, then log back in, they will now see the EIM Client in the list of applications they can install in the Add New Programs section. This method does not install the client for them, so it is a great option if you do not require your users to have EIM installed, or it may be a handy tutorial if you want to do a similar thing for another product.

Labels: , , ,

Thursday, November 1, 2007

EIM Hyperlinks

Yesterday we did our Sprint 1 Review for EIM v3.3.0.0. Among the features is the ability to launch a EIM conversation from a link. If you happen to be reading this and have EIM installed, click here to see what I mean. It works by using a registry entry to associate the pweim:// protocol with the client EXE file on your machine. We put in some extra magic via named pipes and .Net Remoting so that it doesn't open a new instance of the client if you already have one open, so it behaves pretty cleanly.

So that's all great and dandy, but what you're probably more interested in is how to create these links. It's really just a special URI, like any other link you might see such as http://www.passageways.com/ In this case, the protocol is http://, for the pweim link well replace that with pweim:// and then follow it up with the [only] command "startconversation". This will start EIM if it hasn't been started already, allow the user to log in, and then show the Send IM Dialog. So the most basic link looks like:

pweim://startconversation

Next, you may want to specify a user that this conversation will be started with. We do this by including the "username" key in the query string and specifying the username. The username can be found in the Portal on the User Profile page. So if I want to know Matt's username, I'd do a search of the Employee Directory for "Matt Magurany" and find his profile. I find that his username is "matt", so this link would look like:

pweim://startconversation?username=matt

Alternatively, I can use his userID which is a GUID. That link might look like this:

pweim://startconversation?userid=863e10fe-628c-42e7-a4e8-02be93e99aee

Lastly, you can also include a message that will appear in the message input area by using the "message" key in the query string, forming a link that looks like this:

pweim://startconversation?username=matt&message=Hello+Matt!

The great [but not officially supported] thing about this is you can put these links just about anywhere. You can roll your own custom module and have links to users that fire up EIM. You can put an EIM link in your email signature in Outlook. You can put it in a Word document, a PDF, or any other place you put a web link. If they do not have EIM they'll get a 404 Web Page not found error. Otherwise, if they click the link and have EIM installed they're on their way!

Labels: , ,