Initiating a Program File at the Client

This section describes three techniques for initiating a program file at the client computer that installs the Advanced Client:

  • Logon Script-initiated Client Installation

  • Manual Installation

  • Software Distribution

Logon Script-initiated Client Installation

Use Logon Script-initiated Client Installation (Capinst.exe) to discover and install Advanced Clients when users log on.

Capinst.exe is located in the Client\i386 folder in the SMS_<site code> shared folder on the SMS site server. It is also available on the SMS 2003 CD in the SMSSetup\Client\i386 folder. To enable users to run it from other locations, such as domain controllers, you must copy it to those locations. However, if a future version of SMS 2003 (including service packs and other updates) has an updated version of Capinst.exe, you must update the copies of Capinst.exe that you have put in these other locations. Client.msi, Ccmsetup.exe, and any language-specific files or folders must be in the same folder as Capinst.exe.

Logon Script-initiated Client Installation never displays error messages. All messages are written to the %Temp%\Capinst.log file on the client.

This section contains information about setting up the logon script and examples that illustrate Logon Script-initiated Client Installation by using Capinst.exe to install the Advanced Client.

Setting up logon scripts to discover and install clients

When you modify the logon script, you must include:

  • A call to Capinst.exe.

  • Any command-line options or installation properties.

Optionally, you can also include:

  • A script to ensure that computers that already have the SMS client. Do not try to reinstall it unnecessarily, unless you want to reinstall the clients.

  • A script to ensure that computers that log on over slow network links do not try to install the client. For more information, see the "Checking for slow network links" section later in this chapter.

  • A script to selectively install the SMS client software so that you do not install the SMS client on all computers in a short period of time, causing excessive network traffic, or so that you do not install SMS on computers that you must exclude from management by SMS.

If your changes to the logon scripts use program files that are not available on all destination client computers, add those program files to the Netlogon shared folder on all your domain controllers. These files include:

  • Capinst.exe.

  • Slownet2.exe or Rascheck.exe.

  • Rndlogin.exe.

If you have too many domain controllers to manually configure them, you can set up file replication on a domain controller (usually the primary domain controller or equivalent), and then copy these files to the domain controller. That domain controller then replicates the files to all other domain controllers. For more information, see the "Setting up file replication" section later in this chapter. If you have a small number of domain controllers, you can copy the files to the Netlogon shared folder on the domain controllers.

Note

  • Windows Installer installs only one program at a time. If your logon script also installs other programs, you might want to configure the logon script to install the Advanced Client software first.

Use the Capinst.exe command in the logon script with the following switches, alone or in combination, to support and control Advanced Client installation.

/AdvCli Installs the Advanced Client with a default configuration by using Ccmsetup.exe. The Advanced Client files are downloaded from the management point that the server locator point determines is appropriate for the client. If the /AdvCli switch is not used, or if the computer operating system is not supported by the Advanced Client, then the Legacy Client is installed. Ccmsetup.exe, Client.msi, and any relevant language-specific files or folders must be in the same folder as Capinst.exe. Use the following command to install the Advanced Client:

Capinst.exe /AdvCli /SLP=<server locator point>

/SLP= Indicates a server locator point to use during client installation. A server locator point server name must be specified with this switch. Do not specify a path to the server name. If this switch is not used, Capinst.exe automatically searches for a server locator point. For example, if your organization does not use Active Directory, and you want to install the Advanced Client, use the following command:

Capinst.exe /AdvCli /SLP=<server locator point>

Note

  • As a best practice, always include the /SLP switch when installing either type of SMS client with Logon Script-initiated Client Installation. Capinst.exe fails to find the server locator point if the Active Directory schema is not extended for SMS and the server locator point is not specified.

/AdvCliCmd Passes the rest of the string following /AdvCliCmd directly to Ccmsetup.exe, as in:

Capinst.exe /AdvCli /SLP=<server locator point> /AdvCliCmd <Client.msi installation properties>

For example,

Capinst.exe /AdvCli /SLP=<server locator point> /AdvCliCmd CCMENABLELOGGING=TRUE
 CCMLOGLEVEL=0 CCMLOGMAXSIZE=100000 CCMLOGMAXHISTORY=1

Important:

  • If you do not specify the SMSSITECODE property on the Capinst.exe command, SMSSITECODE=AUTO is appended to the other installation properties and the Advanced Client is automatically assigned to an SMS site.

/AutoDetect= Calls a script or program file that is specified after this switch. The script or program file must be in the same folder as Capinst.exe. You can either specify the path or set the path as an environment variable on the client. The script must not display output to the user. The correct syntax is:

Capinst.exe /AutoDetect=<

script>

The following is a sample script (Wscript.Echo):

set wmiObject =
GetObject("winmgmts:root\CIMV2:Win32_SystemEnclosure='System Enclosure 0'")
if wmiObject.ChassisTypes(0)=10 Then
       wscript.quit 1
else
       wscript.quit 0
end if

Important:

  • This script is only an example. It does not successfully find laptops in all circumstances. For more information, see Chapter 2, "Collecting Hardware and Software Inventory," in the Microsoft Systems Management Server 2003 Operations Guide.

Use /AutoDetect=< script > to install a Legacy Client, Advanced Client, or no client, depending upon the value returned by the script.

If the /AutoDetect= return value is 1, and the client operating system is supported by the Advanced Client, then the Advanced Client is installed.

If the /AutoDetect= return value is 1, and the client operating system is not supported by the Advanced Client, then the Legacy Client is installed.

If the /AutoDetect= return value is 0, then the Legacy Client is installed.

If the /AutoDetect= return value is other than 1 or 0, then no client is installed.

/DC Installs the Advanced Client even when the destination computer is a domain controller:

Capinst.exe /DC

Checking for slow network links

Installing the SMS client from a logon script on a computer that has a slow network link to the source of the SMS client software files can take an extended period of time. If this is a likely situation for your users, include commands in your logon script to test the network link and skip the SMS client installation on slow links.

You can use Slownet2.exe to test the network speed. Create the script as shown in the following sample script. This script presumes that the Slownet2.exe file is on the Netlogon shared folder of your domain controllers.

%0\..\Slownet2.exe
IF ERRORLEVEL 1 GOTO SKIPSMS
REM substitute this line with whichever SMS client installation command you use
:SKIPSMS

In some cases, Slownet2.exe might be unreliable. If you use Remote Access Service (RAS), you can use the RAS Connection Tester (CheckRAS.exe) in place of Slownet.exe. RAS Connection Tester detects whether the network link is a RAS dial-up link. RAS Connection Tester does not work with all dial-up servers. As a best practice, test it with your dial-up solution to ensure that it works in your environment.

Slownet2.exe is available on the SMS 2003 CD. RAS Connection Tester is included in the SMS 2.0 SP2 Support Tools, which you can download from https://www.microsoft.com/smserver/downloads.

Setting up file replication

For maximum efficiency and reliability, replicate the files that are used to install SMS clients from logon scripts to the Netlogon shared folder of every domain controller. If all your domain controllers run Windows 2000 or Windows Server 2003 family operating systems, you must use File Replication Service (FRS) to replicate the files. If you have Windows NT 4.0 domain controllers, you must use the Directory Replicator Service. If you have a mix of both kinds of domain controllers, see Microsoft Knowledge Base article 248358 at https://support.microsoft.com for more information about file replication in a mixed mode environment.

The Windows NT 4.0 Directory Replicator Service is configured using Server Manager or the Server icon in Control Panel on a Windows NT 4.0 domain controller. After replication is enabled, you must copy the logon script files to the Export\Scripts folder of the Repl$ shared folder on the computer that performs the replication. That computer then replicates those files to all the other Windows NT 4.0 domain controllers.

FRS replication of files for the Netlogon shared folder is enabled by default on all domain controllers that are running Windows 2000 or Windows Server 2003 family operating systems. You copy the logon script files to the <domain>\Scripts folder of the Sysvol shared folder on any domain controller. The files are automatically replicated to all other domain controllers that are running Windows 2000 Windows Server 2003 family operating systems.

If you have multiple user account domains, the above process must be repeated for each domain that contains SMS clients.

Manual Installation

To install the Advanced Client manually on a client computer, use the Advanced Client Installer (Ccmsetup.exe). For more information about using Ccmsetup.exe, see the "Using Advanced Client Installer" section earlier in this chapter.

Software Distribution

To install Advanced Clients through software distribution, use Ccmsetup.exe with your software distribution package. You can fully preconfigure the client using registry entries and command-line options described earlier in this section.

Also, SMS 2003 includes a package definition file (Smsclint.sms) for distributing the Advanced Client by using SMS software distribution. This file is installed on your SMS site server only if you choose the optional Package Automation Scripts during SMS setup. It is also available on the SMS 2003 CD. Use the Create Package from Definition Wizard to use this package definition file. For information about using the Create Package from Definition Wizard, see Chapter 5, "Distributing Software," in the Microsoft Systems Management Server 2003 Operations Guide.

For More Information

Did you find this information useful? Please send your suggestions and comments about the documentation to smsdocs@microsoft.com.