为运行 Intune 软件客户端的 Windows 电脑添加应用Add apps for Windows PCs that run the Intune software client

适用于:经典门户中的 IntuneApplies to: Intune in the classic portal
在寻找有关 Azure 门户中 Intune 的文档吗?Looking for documentation about Intune in the Azure portal? 请转到此处Go here.

通过本主题中的信息了解如何在部署应用之前将它们添加到 Intune。Use the information in this topic to learn how to add apps to Intune before you deploy them.

重要

本主题中的信息可帮助你为使用 Intune 软件客户端管理的 Windows 电脑添加应用。The information in this topic helps you add apps for Windows PCs that you manage by using the Intune software client. 如果想为已注册的 Windows 电脑和其他移动设备添加应用,请参阅在 Microsoft Intune 中为移动设备添加应用If you want to add apps for enrolled Windows PCs and other mobile devices, see Add apps for mobile devices in Microsoft Intune.

要将应用安装到电脑,这些应用必须可以静默方式安装而无需用户交互。To install apps to PCs, they must be capable of being installed silently, with no user interaction. 否则,安装将失败。If this is not the case, the installation will fail.

添加应用Add the app

遵循以下过程,使用 Intune 软件发行者来配置应用的属性,并将该应用上载到云存储空间:You use the Intune Software Publisher to configure the properties of the app and upload it to your cloud storage space by using the following procedure:

  1. Microsoft Intune 管理员控制台中,选择“应用 > 添加应用”,启动 Intune 软件发行者。In the Microsoft Intune administrator console, choose Apps > Add Apps to start the Intune Software Publisher.

    提示

    在该发行者启动前,你可能需要先输入 Intune 用户名和密码。You might need to enter your Intune user name and password before the publisher starts.

  2. 在发行者的“软件安装程序”页上,在“选择如何将此软件提供给设备”下,选择“软件安装程序”,然后指定:On the Software setup page of the publisher, under Select how this software is made available to devices, choose Software installer, and then specify:

    • 选择软件安装程序文件类型Select the software installer file type. 此设置指示要部署的软件的类型。This indicates the type of software that you want to deploy. 对于 Windows 电脑,选择Windows InstallerFor a Windows PC, choose Windows Installer.
    • 指定软件安装程序文件的位置Specify the location of the software setup files. 输入安装文件的位置,或选择“浏览”选择列表中某个位置。Enter the location of the installation files, or choose Browse to select the location from a list.
    • 包括同一文件夹中的其他文件和子文件夹Include additional files and subfolders from the same folder. 某些使用 Windows Installer 的软件要求安装支持文件。Some software that uses Windows Installer requires supporting files. 这些文件必须位于安装文件所在的文件夹中。These must be located in the same folder as the installation file. 如果还想要部署这些支持文件,请选择此选项。Select this option if you also want to deploy these supporting files.

    例如,如果你要将一个名为 Application.msi 的应用发布到 Intune,页面将如下所示:发行者软件安装程序页For example, if you want to publish an app named Application.msi to Intune, the page would look like this: Software setup page of the publisher

    此安装类型会使用一些云存储空间。This installation type uses some of your cloud storage space.

  3. 在“软件描述”页上,配置下列设置。On the Software description page, configure the following.

    备注

    由于所使用的安装程序文件不同,其中某些值可能已自动输入,或者可能不会显示。Depending on the installer file that you are using, some of these values might have been automatically entered, or they might not appear.

    • 发布者Publisher. 输入应用发布者的名称。Enter the name of the publisher of the app.
    • 名称Name. 输入应用的名称,该名称将显示在公司门户中。Enter the name of the app as it will be displayed in the company portal.
      请确保使用的所有应用名称都是唯一的。Make sure all app names that you use are unique. 如果同一应用名称存在两次,则在公司门户中将仅向用户显示其中一个应用。If the same app name exists twice, only one of the apps will be displayed to users in the company portal.
    • 说明Description. 输入应用的描述。Enter a description for the app. 这将在公司门户中向用户显示。This will be displayed to users in the company portal.
    • 指向软件信息的 URL(可选)。URL for software information (optional). 输入包含此应用相关信息的网站的 URL。Enter the URL of a website that contains information about this app. 将在公司门户中向用户显示该 URL。The URL will be displayed to users in the company portal.
    • 隐私 URL(可选)。Privacy URL (optional). 输入包含此应用相关隐私信息的网站的 URL。Enter the URL of a website that contains privacy information for this app. 将在公司门户中向用户显示该 URL。The URL will be displayed to users in the company portal.
    • 类别(可选)。Category (optional). 选择一个内置应用类别。Select one of the built-in app categories. 这可让用户在浏览公司门户时更轻松地查找应用。This will make it easier for users to find the app when they browse the company portal.
    • 图标(可选)。Icon (optional). 上载将与应用关联的图标。Upload an icon that will be associated with the app. 用户浏览公司门户时,此图标将与应用一同显示。This is the icon that will be displayed with the app when users browse the company portal.
  4. 在“要求”页中,选择可以安装应用之前必须满足的要求。On the Requirements page, select the requirements that must be met before the app can be installed. 选择:Choose from:

    • 体系结构Architecture. 选择是否可以在 32 位和/或 64 位操作系统上安装此应用。Select whether this app can be installed on 32-bit, 64-bit, or both operating systems.
    • 操作系统Operating System. 选择可以安装此应用的最低操作系统版本。Select the minimum operating system on which this app can be installed.
  5. 在“检测规则”页上,你可以配置规则,以便检测正在配置的应用是否已在电脑上安装。On the Detection rules page, you can configure rules to detect whether the app that you are configuring is already installed on a PC. 或者,可以使用默认检测规则来自动覆盖以前安装的应用的所有版本。Or, you can use the default detection rules to automatically overwrite any previously installed versions of the app. 此选项适用于 Windows Installer(仅限 .exe 文件)。This option is for Windows Installer (.exe files only).

    可以配置的规则包括:The rules that you can configure are:

    • 文件存在File exists. 指定要检测的文件的路径。Specify the path to the file that you want to detect. 可以在电脑上的 %ProgramFiles% 下搜索(搜索 Program Files<路径> 和 Program Files (x86)<路径>),或者在 %SystemDrive% 下搜索(从电脑的根驱动器搜索,通常为驱动器 C)。You can search under %ProgramFiles% (which searches Program Files<path> and Program Files (x86)<path>) on the PC or %SystemDrive% (which searches from the root drive of the PC, typically drive C).
    • MSI 产品代码存在MSI product code exists. 选择“浏览”以选择想要检测的 Windows Installer (msi) 文件。Choose Browse to choose the Windows Installer (.msi) file that you want to detect.
    • 注册表项存在Registry key exists. 指定以 HKEY_LOCAL_MACHINE\ 开头的注册表项。Specify a registry key that begins with HKEY_LOCAL_MACHINE\. 将同时搜索 32 位和 64 位路径。Both 32-bit and 64-bit registry paths are searched. 如果在任一位置中存在指定的项,则满足检测规则。If the key that you specified exists in either location, the detection rule is satisfied.

    如果应用满足任何配置的规则,则不会安装该应用。If the app satisfies any of the rules that you have configured, it will not be installed.

  6. 仅对于“Windows Installer”文件类型(.msi 和 .exe):在“命令行参数”页上,选择是否想要为安装程序提供可选命令行参数。For the Windows Installer file type only (.msi and .exe): On the Command line arguments page, choose whether you want to supply optional command-line arguments for the installer. Intune 自动添加以下参数:The following parameters are added automatically by Intune:

    • 对于 .exe 文件,添加 /installFor .exe files, /install is added.
    • 对于 .msi 文件,添加 /quietFor .msi files, /quiet is added. 请注意,只有在应用包的创建者启用了相应功能的情况下,这些选项才会生效。Note that these options will only work if the creator of the app package enabled functionality for this.
  7. 仅对于“Windows Installer”文件类型(仅 .exe):在“返回代码”页上,你可以添加新的错误代码,在托管 Windows 电脑上安装应用时,Intune 将解释这些错误代码。For the Windows Installer file type only (.exe only): On the Return codes page, you can add new error codes that Intune interprets when the app is installed on a managed Windows PC.

    默认情况下,Intune 使用行业标准的返回代码来报告应用包安装是失败还是成功:0(成功)或 3010(成功并重新启动)。By default, Intune uses industry-standard return codes to report the failure or success of an app package installation: 0 (Success) or 3010 (Success with restart). 还可以向此列表中添加你自己的返回代码。You can also add your own return codes to this list. 如果指定了返回代码列表,则在应用安装返回列表中不存在的代码,该代码会被解释为失败。If you specify a list of return codes and the app installation returns a code that isn't on the list, it is interpreted as a failure.

  8. 在“摘要”页上,审阅你指定的信息。On the Summary page, review the information that you specified. 准备就绪后,选择“上载”。When you are ready, choose Upload.

  9. 选择“关闭”完成操作。Choose Close to finish.

该应用将显示在“应用”工作区的“应用”节点中。The app is displayed on the Apps node of the Apps workspace.

后续步骤Next steps

创建应用后,下一步是进行部署。After you've created an app, the next step is to deploy it. 若要获取详细信息,请参阅在 Microsoft Intune 中部署应用To find out more, see Deploy apps in Microsoft Intune.

如需阅读有关将软件部署到 Windows 电脑的提示和技巧的详细信息,请参阅博客文章 Support Tip: Best Practices for Intune Software Distribution to PC’s(支持提示:将 Intune 软件分发到电脑的最佳实践)。If you want to read more information about tips and tricks to deploy software to Windows PCs, see the blog post Support Tip: Best Practices for Intune Software Distribution to PC’s.