# Deploy clients with ConfigMgr

You can use ConfigMgr to perform a large-scale, production deployment of the Adaptiva client. As with all Software Distribution in ConfigMgr, the first step is to create the package and program(s). If you are using Operating System Deployment, a package and program will be needed in the task sequence, do not use an application.

The application model can also be used for Adaptiva client deployment outside of a task sequence.

## (SaaS only) Access the Full Adaptiva Client

**For users of OneSite Patch SaaS**, you will need to download and install the Adaptiva P2P client to gain access to the full Adaptiva client.

1. Follow these [steps to download and install](https://docs.adaptiva.com/platform-install/client-install#saas-client-installation) the Adaptiva P2P Client on a device.
2. On the new device, navigate to `C:\` and show hidden folders.
3. Navigate to the hidden `C:\AdaptivaCache\Client` folder and copy `AdaptivaClientSetup.exe` to an accessible location.

## Create a Package from the Package Definition File

To facilitate creating a pre-defined ConfigMgr package and program, the Adaptiva server provides a Package Definition File. You can find the **AdaptivaClientSetupSilent.sms** file on the Adaptiva server under `<InstallPath>\Program Files\Adaptiva\AdaptivaServer\config`.

1. Create a new folder called **Adaptiva** in the content source file repository.
2. Copy the `adaptiva-client-<version>-windows.exe` file from the installation source to the new folder.
3. Rename the client installer to **AdaptivaClientSetup.exe**. *This is an essential step to ensure a successful package configuration.*
4. In the ConfigMgr console, open the **Software Library** workspace.
5. In the navigation pane, expand **Application Management**, then right-click **Packages** and select **Create Package from Definition**.

   ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-7be03d575cf2bf6ca49c1559c2bf73cc598e21a3%2Fcreate-package.png?alt=media)
6. On the **Package Definition** page, click **Browse** and navigate to `<InstallPath>\Program Files\Adaptiva\AdaptivaServer\config` folder on the Adaptiva server and select the **AdaptivaClientSetupSilent.SMS** file.
7. Click **Open**. The package name and version will be displayed. Select it and then click **Next**.

   ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-7a5ae3fd04bb535fd74797db522e46d4c44d40fe%2Fpackage-definition.png?alt=media)
8. At the **Source Files** page, select **Always obtain source files from a source folder** and click **Next**.

   ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-302877b3e2e01c26cd1d9151e310dd2aee0dc351%2Fpackage-source-files.png?alt=media)
9. At the **Source Folder** page, enter the UNC path to the **Adaptiva** folder created in step 1 and click **Next**.

   ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-480510ec1d4a6cc1bb13da2d090394fc2d9861d2%2Fpackage-source-folder.png?alt=media)
10. Complete the **Create Package from Definition Wizard**. This will create a new **AdaptivaClient** package.
11. Click the **Programs** tab under the package details.

The package includes 8 programs for the installation, upgrade, and uninstallation of the Adaptiva client.

| Name                              | Command Line                                                                                                                  | Description                                                                                                        |
| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| CleanInstall                      | `AdaptivaClientSetup.exe -cleaninstall -servername <ServerFQDN>`                                                              | Uninstalls The Adaptiva Client Health And OneSite Client, And Installs It Again                                    |
| CleanInstallInternet              | `AdaptivaClientSetup.exe -cleaninstall -servername <ServerFQDN> -serverguid <ServerGUID> -cloudrelay`                         | Uninstalls The Adaptiva Client Health And OneSite Client, And Installs It Again - Supports Cloud Relay             |
| CleanInstallInternetNoCacheDelete | `AdaptivaClientSetup.exe -cleaninstall -servername <ServerFQDN> -nocachedel -serverguid <ServerGUID> -cloudrelay -nocachedel` | Uninstalls The Adaptiva Client Health And OneSite Client, And Installs It Again - Supports Cloud Relay             |
| CleanInstallNoCacheDelete         | `AdaptivaClientSetup.exe -cleaninstall -servername <ServerFQDN> -nocachedel`                                                  | Uninstalls The Adaptiva Client Health And OneSite Client, And Installs It Again                                    |
| InstallOrUpgrade                  | `AdaptivaClientSetup.exe -installorupgrade -servername <ServerFQDN>`                                                          | Installs The Adaptiva Client Health And OneSite Client, Or Upgrades It If Already Installed                        |
| InstallOrUpgradeInternet          | `AdaptivaClientSetup.exe -installorupgrade -servername <ServerFQDN> -serverguid <ServerGUID> -cloudrelay`                     | Installs The Adaptiva Client Health And OneSite Client, Or Upgrades It If Already Installed - Supports Cloud Relay |
| Uninstall                         | `AdaptivaClientSetup.exe -uninstall`                                                                                          | Uninstalls the Adaptiva Client Health And OneSite Client                                                           |
| UninstallNoCacheDelete            | `AdaptivaClientSetup.exe -uninstall -nocachedel`                                                                              | Uninstalls the Adaptiva Client Health And OneSite Client                                                           |

{% hint style="info" %}
You can find more information on the Adaptiva client installation switches in the [Client Install](https://docs.adaptiva.com/platform-install/client-install-and-uninstall/client-install) documentation.
{% endhint %}

By default, these programs will be set to display notifications to users when deployed unless notifications are suppressed via client policy.

12. To disable notifications, right-click the program and click **Properties**.
13. Click the **Advanced** tab.
14. Check the **Suppress program notifications** checkbox and click **OK**.

    ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-c6ce4e4884d57656f1e22e8ec51565c346b0dfb7%2Fprogram-notifications.png?alt=media)

You can now deploy the program to collections of devices in your environment.

## Create an Application using the EXE

You can also deploy the Adaptiva client by creating a ConfigMgr application and deployment type using the `adaptiva-client-<version>-windows.exe`.

1. Create a new folder called **Adaptiva** in the content source file repository.
2. Copy the `adaptiva-client-<version>-windows.exe` file from the installation source to the new folder.
3. In the ConfigMgr console, open the **Software Library** workspace.
4. In the navigation pane, expand **Application Management**, then right-click **Applications** and click **Create Application**. The Create Application Wizard appears.
5. On the General page, select **Manually specify the application information** and click **Next**.

   ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-447f7b60348e6288fb145b46a1906a61be46bd82%2Fapplication-settings.png?alt=media)
6. On the General Information page, enter the information:

   Name: **Adaptiva Client Setup**

   Publisher: **Adaptiva**

   Software version: `<version>`

   Enter the other fields as required by your company's standards.
7. Click **Next**.
8. On the Software Center page enter the information as required by the company's standards and click **Next**.
9. On the Deployment Types page, click **Add...**. The Create Deployment Type Wizard appears.

   ![](https://1238239958-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzBcNZqjCKqgdpA83eD4o%2Fuploads%2Fgit-blob-95c741c2f96c8f249b4ef439714c95ee13b0ae3a%2Fapplication-deployment-type.png?alt=media)
10. On the General page, click the **Type** drop-down and select **Script Installer**.
11. The **Manually specify the deployment type information** radion button will be automatically selected. Click **Next**.
12. On the General Information page, enter a Name of **Adaptiva Client Setup**, then click **Next**.
13. On the Content page, next to Content location, click **Browse**.
14. Select **Browse...** and enter the UNC path to where the Adaptiva client was copied.
15. Next to Installation program, click Browse and select the `adaptiva-client-<version>-windows.exe` file.
16. Add the following switches to the Installation program:

    `adaptiva-client-<version>-windows.exe -INSTALLORUPGRADE -SERVERNAME <serverfqdn> | -SERVERIP <serveripaddress> -CloudRelay`

    If you are using the Cloud Relay service or if HTTP client communications will be used, include the following switches:

    Cloud Relay service: `-CloudRelay`, `-ServerGUID <GUID>`, `-Password <Secret>` HTTP communications: `-ServerURL <ServerURL:port>`
17. Next to Uninstall program, click Browse and select select the `adaptiva-client-<version>-windows.exe` file.
18. Add the following switches to the Uninstall program:

    `adaptiva-client-<version>-windows.exe -UNINSTALL`

{% hint style="info" %}
You can find more information on the Adaptiva client installation switches in the [Client Install](https://docs.adaptiva.com/platform-install/client-install-and-uninstall/client-install) documentation.
{% endhint %}

19. Click **Next**.

#### Create Detection Method

1. On the Detection Method page, click **Add Clause...**.
2. From the Setting Type drop-down, select **Registry**.
3. Next to Hive, click **Browse...**.
4. Enter the Adaptiva Server computer name and click **Connect**.
5. Expand the Adaptiva server node and navigate to `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\AdaptivaClient`.
6. In the Registry Value pane, select **DisplayName** and click **OK**.
7. Select the **This registry setting must satisfy the following rule to indicate the presence of this application** radio button. The current value will be automatically entered.
8. Click **OK**.

#### Complete the Wizard

1. Click **Next**.
2. On the User Experience page, next to Installation behavior, select **Install for system**.
3. Next to Logon requirement, select **Whether or not a user is logged on**.
4. Next to Installation program visibility, select **Hidden**.
5. Click **Next**.
6. On the **Requirements** page, click **Next**.
7. On the **Dependencies** page, click **Next**.
8. On the **Summary** page, click **Next** and then click **Close** when the wizard has completed successfully.
9. On the Deployment Types page, click **Next**.
10. Click **Next** on the Summary page and then click **Close** when the wizard has completed successfully.
11. Right-click the **Adaptiva Client Setup** application and click **Distribute Content**.
12. Complete the Distribute Content Wizard with the necessary Distribution Point or Distribution Point Group.

## Create an Application using the P2P MSI

You can distribute the Peer-to-peer (P2P) installer using a ConfigMgr application and deployment type.

1. Create a new folder called **Adaptiva** in the content source file repository.
2. Copy the `adaptiva-client-p2p-<version>-windows.msi` file from the installation source to the newly created folder.
3. In the ConfigMgr console, open the **Software Library** workspace.
4. In the navigation pane, expand **Application Management**, then right-click **Applications** and click **Create Application**. The Create Application Wizard appears.
5. On the General page, click **Browse...**, enter the UNC path to the content source and select the `adaptiva-client-p2p-<version>-windows.msi` file. Click **OK**.
6. Click **Next**.
7. On the **View imported information page**, verify that the application information was successfully imported from the Windows Installer (\*.msi file) and click **Next**.
8. On the **General Information** page, update any information as required. We recommended that you at least add the Publisher and Software version information.
9. Next to Installation program, update the command line using the following switches:

   ```cmd
   msiexec.exe /I adaptiva-client-p2p-<version>-windows.msi /qn SERVERNAME=<ServerFQDN> SOURCEUNCPATH=\\<ServerFQDN>\AdaptivaClient\AdaptivaClientSetup.exe WAITFORCOMPLETION=1
   ```

   If you are using the Cloud Relay service or if HTTP client communications will be used, include the following switches:

   Cloud Relay service: `-CloudRelay`, `-ServerGUID <GUID>`, `-Password <Secret>` HTTP communications: `-ServerURL <ServerURL:port>`
10. Click **Next**.
11. On the **Summary** page, click **Next** and then click **Close** when the wizard has completed successfully.
12. In the Applications details, select the **Adaptiva Peer To Peer Client Installer** application.
13. Select the **Deployment Types** tab in the application details.
14. Right-click the deployment type and click **Properties**.
15. Select the **Content** tab.
16. Check the **Allow clients to use distribution points from the default site boundary group** box.
17. Next to Deployment options, select **Download content from distribution point and run locally**.
18. Select the **Detection Method** tab.

    Notice the detection method. The MSI product code is specific to this version of the Adaptiva Client P2P Installer.
19. Click **OK**.
20. To make this visible in Software Center, right-click the application and click **Properties**.
21. On the General Information and Software Center tabs, update the information as required per the company's standards. Click **OK** when finished.
22. Right-click the application and click **Distribute Content**.
23. Complete the Distribute Content Wizard with the necessary Distribution Point or Distribution Point Group.
