Settings

Deploy Microsoft Dynamics CRM for Outlook with Systems Management Server 2003

Published: May 8, 2008

Microsoft Systems Management Server (SMS) 2003 or its successor, Microsoft System Center Configuration Manager 2007, can be the most flexible means to deploy software on a network. With these applications, you have more administrative control over the targeting of users or systems, the elevation of user rights for installation, specifying when an installation can take place, and much more. This article focuses on how administrators can use SMS 2003 to deploy Microsoft Dynamics CRM for Microsoft Office Outlook to users and computers across their networks.

On This Page
Requirements and limitations Requirements and limitations
Best practices when distributing the application Best practices when distributing the application
Create and distribute the application Create and distribute the application
Automate configuration tasks after installation Automate configuration tasks after installation
VBS script  to verify the Microsoft Dynamics CRM for Outlook installation VBS script to verify the Microsoft Dynamics CRM for Outlook installation

Requirements and limitations

Before you try to deploy Microsoft Dynamics CRM for Outlook by using SMS 2003, note the following requirements and limitations.

  • SMS 2003 with SP3 or System Center Configuration Manager 2007 is recommended.

  • You must use the ClientSetup.exe Setup program to deploy the application. You cannot use the Microsoft Installer (MSI) file.

  • You must install and configure the SMS 2003 server to enable applications to be pushed to the client systems. For example, you must configure the Background Intelligence Transfer Service (BITS), and configure the SMS 2003 server for application advertisement and distribution in Active Directory. For more information about how to configure a SMS 2003 server to distribute applications, see the SMS 2003 documentation.

  • Although you can deploy Microsoft Dynamics CRM for Outlook (desktop client) silently using SMS 2003, you cannot deploy Microsoft Dynamics CRM for Outlook with Offline Access in an unattended (silent) manner. This is because user-specific information is required for the installation of SQL Server 2005 Express Edition, which is a required component of Microsoft Dynamics CRM for Outlook with Offline Access.

Top of page

Best practices when distributing the application

This topic describes one method that you can use to deploy Microsoft Dynamics CRM for Outlook by using SMS 2003 that can work in most situations. For more information about SMS 2003, see the following Microsoft TechNet Web site:

Systems Management Server 2003 Technical Library

Tips for Microsoft Dynamics CRM for Outlook with Offline Access installations.

  • Before you can run Microsoft Dynamics CRM for Outlook, you must first install the application, and then you must configure it for each user. Although you can install the application by using SMS, you cannot configure it by using SMS, without creating a script first. Therefore, to reduce the possibility of mis-configuration, make sure that you pre-populate each option in the Setup XML configuration file. Then, communicate to users that they need to click only Next in the Setup wizard to complete the installation. Instruct the users not to change any of the options, since they have been pre-selected.

    Alternatively, you can write a script that runs Setup and uses the XML configuration file to configure Microsoft Dynamics CRM for Outlook silently. This script can be distributed by SMS.

    For more information about running Setup, at the command line, and how to use the Setup XML configuration file, see the Installing Guide that is in the Microsoft Dynamics CRM Implementation Guide.

  • Manually restart the client computer after the installation is successful.

  • Create a script to configure Microsoft Dynamics CRM for Outlook with Offline Access or manually run the Configuration Wizard.

Top of page

Create and distribute the application

The following steps assume that SMS 2003 with SP3 is already installed, configured, and running in your organization. In addition, it assumes that the SMS 2003 client agents are installed where you want to deploy Microsoft Dynamics CRM for Outlook. For more information about how to configure SMS 2003, see the SMS 2003 documentation.

  1. Copy all Microsoft Dynamics CRM for Outlook installation files and folders, from both of the following source folders, to a single network shared folder that can be accessed from the SMS 2003 server:

    • Client. This folder contains all Microsoft Dynamics CRM for Outlook Setup files and folders.

    • Redist\i386. In this folder you'll find all of the redistributable prerequisite components that are installed during Microsoft Dynamics CRM for Outlook Setup, such as MSXML, SQL Server 2005 Express Edition, and the Microsoft Visual C++ redistributable package.

    Important

    To perform a silent installation you must copy the redistributable prerequisite components (Redist\i386) to the source folder and files, which are located on the Microsoft Dynamics CRM for Outlook download package. Or, if installing from a DVD, the Microsoft Dynamics CRM for Outlook Setup files are located on the disk. To avoid excessive network traffic, you can copy the Setup files to the computer that is running SMS 2003.

  2. Create a collection. An SMS collection contains a set of resources for software distribution. In this case, these would be the client computers on which you want to install Microsoft Dynamics CRM for Outlook. To create the collection, follow these steps.

    1. On the SMS 2003 server, logged on as administrator, start SMS Administrator Console.

    2. Expand Site Database, right-click Collections, point to New, and then click Collection.

    3. On the Collection Properties dialog box, type the collection name, such as Microsoft Dynamics CRM for Outlook.

    4. Click the Membership Rules tab, click New, and then use the following information to complete the Create Direct Membership Rule Wizard.

      1. On the Create Direct Membership Rule Wizard welcome page, click Next.

      2. On the Search for Resources page, in the Resource class list, select System Resource, in the Attribute name list select Name, and then in the Value box type the percent symbol (%). This returns the resources.

      3. Click Next.

      4. On the Collection Limiting page, click Next.

      5. On the Select Resources page, select the computers on which you want to install Microsoft Dynamics CRM for Outlook.

      6. Click Finish, and then, in the Collection Properties dialog box, click OK.

  3. Distribute Microsoft Dynamics CRM for Outlook.

    1. On the SMS 2003 server, logged on as administrator, start SMS Administrator Console.

    2. Expand Site Database, expand Collections, and then right-click the collection that you created previously.

    3. Point to All Tasks, and then click Distribute Software.

    4. On the Distribute Software to Collection Wizard welcome page, click Next.

    5. On the Package page, click the Create a new package and program option, and then click Next.

    6. On the Package Identification page, type a name for the package. You can enter information in the other fields to describe the version, publisher, and language. Click Next.

    7. On the Sources Files page, click Create a compressed version of the source, and then click Next.

    8. On the Source File Compression page, click Local drive on site server, and then type the location or click Browse to enter the folder where the Microsoft Dynamics CRM for Outlook installation files are located.

      Important

      The source directory that you specify must contain the SetupClient.exe file.

    9. On the Distribution Points page, select the SMS server, and then click Next.

    10. On the Program Identification page, enter the program name and the command line that will be used to run Microsoft Dynamics CRM for Outlook Setup.

      Use the following list when determining program-name and command-line information.

      • Name. Type a name that describes the application or intent of this package distribution.

      • Command line. Enter the command that will be used to run the Setup program. For example, the following command installs Microsoft Dynamics CRM for Outlook (desktop only) to the folder c:\program files\Microsoft Dynamics CRM with no user action required during the installation.

        SetupClient.exe /Q /L "c:\clientinstalllog.txt" /targetdir "c:\program files\Microsoft Dynamics CRM" INSTALLLEVEL=3

        Note the following parameters:

        • /targetdir. Where the client must be installed.

        • INSTALLLEVEL. Which client will be installed: 2 specifies Microsoft Dynamics CRM for Outlook (desktop client that must be online), 3 is for Microsoft Dynamics CRM for Outlook with Offline Access (laptop client).

        • /L. Where to put the log.

        • /Q. Indicates a silent installation. Do not use this option if you are deploying Microsoft Dynamics CRM for Outlook with Offline Access.

    11. On the Program Properties page, select the following options.

      • In the Program can run list, select Only when a user is logged on.

      • Select Run with administrative rights.

        Important

        If you are installing Microsoft Dynamics CRM for Outlook with Offline Access (laptop client), you must select Allow users to interact with this program. This allows the installation of the prerequisite components. Alternatively, do not select this option if you are installing Microsoft Dynamics CRM for Outlook (desktop) and you want the installation to occur silently (using the /Q parameter).

      • In the After running list, select No action required.

    12. On the Advertise a Program page, select Yes, and then click Next.

    13. On the Select a Program to Advertise page, you can add a comment in the Comment box, but do not make any other changes. Click Next.

    14. On the Advertisement Name page, do not make any changes. Click Next.

    15. On the Advertise to Subcollections page, do not make any changes. Click Next.

    16. On the Advertisement Schedule page, make sure the advertisement never expires. Click Next.

    17. On the Assign Program page, click Yes, select the date that you want to assign the program in the Assign after list, and then click Next.

    18. On the Completing the Distribute Software to Collection Wizard page, click Finish.

  4. Configure BITS on the advertisment, which will run the program from the distribution point. If the client disconnects from the network, the Setup program will fail. For most deployments, you will want to use BITS to download the package to the client machine before the SMS server attempts to run the advertised program. If the client disconnects, the SMS server will resume from the point where the disconnnection occured. Note that, the advertised program will not appear in the client cache (c:\WINDOWS\System32\CCM\Cache) without the use of BITS. Upon completing the previous steps, perform the following steps to ensure BITS will be used to download the program.

    1. On the SMS 2003 server, logged on as administrator, start SMS Administrator Console.

    2. Expand Site Database, click Advertisements, right-click the advertisement that you created in the previous step, and then click Properties.

    3. Click the Advanced Client tab, and then click Download program from distribution point. Click OK..

    4. Right-click the Microsoft Dynamics CRM for Outlook advertisement, point to All Tasks, and then click Re-run Advertisement.

    5. Click Yes to confirm the action.

  5. Verify the distribution status. After the package is built and advertised, SMS will upload the Setup files to the client computers that you specified previously.

    • For 32-bit computers, the files will be uploaded to the client to a folder in c:\WINDOWS\System32\CCM\Cache.

    • For 64-bit computers, the files will be uploaded to the client to a folder in c:\WINDOWS\SysWOW64\CCM\Cache.

    The status for the distribution and execution of the package can be verified on the SMS server using the following steps.

    1. On the SMS 2003 server, logged on as administrator, start SMS Administrator Console.

    2. Expand Site Database, expand System Status, expand Advertisement Status.

    3. Right-click the previously-created advertisement, point to Show Messages, and then click All.

    4. The advertisement status messages appear in the SMS Status Message Viewer window. To update the list, on the View menu, click Refresh.

The installation will occur on the clients that you specified in the Distribute Software to Collection Wizard. During the installation, the client computer will display a notification-area icon announcing that a new package is available. If this is not a silent install, users must double-click the icon, select the Microsoft Dynamics CRM for Outlook package, and then click Run. If an error message appears that explains that the package is not yet available, wait a few more minutes, and then try to run the installation again. This behavior occurs because of a known issue whereby SMS 2003 displays the package to the SMS client before all the files have finished uploading.

Top of page

Automate configuration tasks after installation

To automate the configuration of Microsoft Dynamics CRM for Outlook you can add several commands to a .CMD file that is used to configure the application, and then restart the computer.

First, you create a Microsoft Visual Basic Script file (VBS) that waits for the Microsoft Dynamics CRM for Outlook installation to complete by viewing the status of the Setup log. In the following section "VBS script sample for verifying the installation of Microsoft Dynamics CRM for Outlook" there is a sample script that you can use to do this.

Next, you create a command file that runs the following command sequence that configures Microsoft Dynamics CRM for Outlook and then restarts the computer.

SetupClient.exe /q /targetdir "c:\program files\Microsoft CRM" INSTALLLEVEL=2 /l c:\log.txt 

Cscript //nologo CRMSetupLogParser.vbs c:\log.txt Client V4 > ParserOutput.txt 

Shutdown –r
Top of page

VBS script to verify the Microsoft Dynamics CRM for Outlook installation

'************************************************************************************* 

'CRM Setup Log Parser - 

' Server setup only gets called once the log is done, so we loop once checking for an ERROR| 

' Client setup gets called over and over as the log is being generated, 
' so we'll loop until we get a setup completed successfully message or see a failure 

' 

'Incoming Parameters Examples: 

' FileToParse = "C:\CRM_Server_Install.txt" 

' LogType = Client|Server|ConfigureClient 

' ClientVer = "V4" or "V3" 

'************************************************************************************* 

Option Explicit 

Dim objFileSystem 

Dim objFile 

Dim FileToParse 

Dim InstallSuccesSearchString 

Dim UninstallSuccesSearchString 

Dim FailSearchString 

Dim StringFound 

Dim LogType 

Dim LogToPS 

Dim ClientVer 

Dim PassFail 

Dim WaitTime 

Dim LineFromFile 

Dim LineNumber 

Dim TestCaseNumber 

Dim BuildNumber 

Dim RunPurpose 

Dim Owner 

Dim CRMServerName 

Dim ClientMode 

Dim ServerConfig 

Dim PSLoggerArgs 

Const ForReading = 1 

Const TristateTrue = -1 

Const CreateFile = False 

StringFound = "False" 

FileToParse = WScript.Arguments(0) 

LogType = WScript.Arguments(1) 

IF LogType = "ConfigureClient" THEN 

IF WScript.Arguments.Count > 2 THEN 

LogToPS = "False" 

PSLoggerArgs = Split(WScript.Arguments(2),",") 

TestCaseNumber = PSLoggerArgs(0) 

BuildNumber = PSLoggerArgs(1) 

RunPurpose = PSLoggerArgs(2) 

Owner = PSLoggerArgs(3) 

CRMServerName = PSLoggerArgs(4) 

ClientMode = PSLoggerArgs(5) 

ServerConfig = PSLoggerArgs(6) 

END IF 

ELSEIF LogType = "Server" THEN 

IF WScript.Arguments.Count > 2 THEN 

LogToPS = "False" 

PSLoggerArgs = Split(WScript.Arguments(2),",") 

TestCaseNumber = PSLoggerArgs(0) 

BuildNumber = PSLoggerArgs(1) 

RunPurpose = PSLoggerArgs(2) 

Owner = PSLoggerArgs(3) 

CRMServerName = PSLoggerArgs(4) 

ClientMode = PSLoggerArgs(5) 

ServerConfig = PSLoggerArgs(6) 

END IF 

ELSEIF LogType = "Client" THEN 

ClientVer = Ucase(WScript.Arguments(2)) 

IF WScript.Arguments.Count > 3 THEN 

LogToPS = "False" 

PSLoggerArgs = Split(WScript.Arguments(3),",") 

TestCaseNumber = PSLoggerArgs(0) 

BuildNumber = PSLoggerArgs(1) 

RunPurpose = PSLoggerArgs(2) 

Owner = PSLoggerArgs(3) 

CRMServerName = PSLoggerArgs(4) 

ClientMode = PSLoggerArgs(5) 

ServerConfig = PSLoggerArgs(6) 

END IF 

END IF 

WaitTime = 1000 * 15 'The amount of time we'll wait 

LineNumber = 1 

'Call correct log parsing function 

' The ConfigureClient and Server are the same setup logic 

IF LogType = "Client" THEN 

ClientSetupLogParser() 

ELSEIF LogType = "ConfigureClient" THEN 

ServerSetupLogParser() 

ELSEIF LogType = "Server" THEN 

ServerSetupLogParser() 

END IF 

'Write final Pass/Fail to the WTT logger 

IF PassFail = "Pass" THEN 

WScript.Quit(0) 

ELSE 

WScript.Quit(1) 

END IF 

'************************************************************************************* 

'ClientSetupLogParser - 

'************************************************************************************* 

Function ClientSetupLogParser() 

IF ClientVer = "V4" THEN 

InstallSuccesSearchString = "INSTALL.*1" 
'Regular Expression, search for case sensitive "INSTALL (anything) 1" 

UninstallSuccesSearchString = "INSTALL.*1" 
'Regular Expression, search for case sensitive "INSTALL (anything) 1" 

FailSearchString = "Installation failed" 

ELSEIF ClientVer = "V3" THEN 

InstallSuccesSearchString = "Info\| Exit code: 0" 

UninstallSuccesSearchString = "has been successfully uninstalled" 

FailSearchString = "Error\|" 

END IF 

Wscript.sleep(WaitTime) 

Set objFileSystem = CreateObject("Scripting.FileSystemObject") 

Set objFile = objFileSystem.OpenTextFile(FileToParse, ForReading, CreateFile, TristateTrue) 

Dim Timer, TimeLimit ' We'll only loop for %TimeLimit% minutes as a fallback 

Timer = 0 

TimeLimit = 20 

DO WHILE PassFail = "" 

DO WHILE NOT objFile.AtEndOfStream 

LineFromFile = objFile.ReadLine 

'Check for failure 

IF (RegExMatch(FailSearchString, LineFromFile)) THEN 

PassFail = "Fail" 

ELSEIF (RegExMatch(InstallSuccesSearchString, LineFromFile)) THEN 

'If we've already set it to Fail, we don't want to overwrite it if the success line appears further 
' down the line 

IF PassFail <> "Fail" THEN 

PassFail = "Pass" 

END IF 

ELSEIF (RegExMatch(UninstallSuccesSearchString, LineFromFile)) THEN 

'If we've already set it to Fail, we don't want to overwrite it if the success line appears further 
' down the line 

IF PassFail <> "Fail" THEN 

PassFail = "Pass" 

END IF 

END IF 

LineNumber = LineNumber + 1 

LOOP 

IF PassFail = "" THEN 

Wscript.sleep(1000 * 60) 

Timer = Timer + 1 

END IF 

IF Timer > TimeLimit AND ClientVer = "V4" THEN ' Didn't find a result in time, 
' assume a pass and move on 

PassFail = "Pass" 

END IF 

LOOP 

End Function 

'************************************************************************************* 

'ServerSetupLogParser 

'************************************************************************************* 

Function ServerSetupLogParser() 

FailSearchString = "Error|" 

Set objFileSystem = CreateObject("Scripting.FileSystemObject") 

Set objFile = objFileSystem.OpenTextFile(FileToParse, ForReading, CreateFile, TristateTrue) 

WScript.Sleep (WaitTime) 

DO WHILE NOT objFile.AtEndOfStream 

LineFromFile = objFile.ReadLine 

IF (INSTR(1, LineFromFile, FailSearchString, 1) > 0) THEN 

PassFail = "Fail" 

END IF 

LineNumber = LineNumber + 1 

LOOP 

IF PassFail <> "Fail" THEN 

PassFail = "Pass" 

END IF 

End Function 

'************************************************************************************* 

'PSLogger 

'************************************************************************************* 

Function PSLogger(PassFail) 

Dim sh 

Dim wsx 

Dim cmd 

Set sh = CreateObject("WScript.Shell") 

End Function 

' Runs an external program and pipes it's output to 

' the StdOut and StdErr streams of the current script. 

' Returns the exit code of the external program. 

Function Run (ByVal cmd) 

Dim sh: Set sh = CreateObject("WScript.Shell") 

Dim wsx: Set wsx = Sh.Exec(cmd) 

If wsx.ProcessID = 0 And wsx.Status = 1 Then 

' (The Win98 version of VBScript does not detect WshShell.Exec errors) 

Err.Raise vbObjectError,,"WshShell.Exec failed." 

End If 

Do 

Dim Status: Status = wsx.Status 

WScript.StdOut.Write wsx.StdOut.ReadAll() 

WScript.StdErr.Write wsx.StdErr.ReadAll() 

If Status <> 0 Then Exit Do 

WScript.Sleep 10 

Loop 

Run = wsx.ExitCode 

End Function 

'************************************************************************************* 

'Regular Expression comparison function 

'************************************************************************************* 

Function RegExMatch(Pattern,StringToSearch) 

Dim RegEx, Match 

Set regEx = new RegExp 

regEx.Pattern = Pattern 

regEx.IgnoreCase = False 

regEx.Global = True 

RegExMatch = regEx.Test(StringToSearch) 

End Function

Related Links

Did you find the information that you need?
Yes     No 
If not, what information do you need? (optional)

© 2008 Microsoft Corporation. All rights reserved.