使用 Configuration Manager 建立和部署應用程式Create and deploy an application with Configuration Manager

適用於: Configuration Manager (最新分支)Applies to: Configuration Manager (current branch)

在此主題中,您將直接使用 Configuration Manager 建立應用程式。In this topic, you'll jump right in and create an application with Configuration Manager. 在此範例中,您將建立和部署一個應用程式,其中包含適用於 Windows 電腦的企業營運應用程式 (稱為 Contoso.msi),而此應用程式必須安裝在公司內執行 Windows 10 的所有電腦上。In this example, you'll create and deploy an application that contains a line-of-business app for Windows PCs called Contoso.msi, which must be installed on all PCs that are running Windows 10 in your company. 您將在這整個過程中了解有效管理應用程式的事項。Along the way, you'll learn about many of the things you can do to manage applications effectively.

這個程序旨在提供如何建立和部署 Configuration Manager 應用程式的概觀。This procedure is designed to give you an overview of how to create and deploy Configuration Manager applications. 不過,它未涵蓋所有設定選項,或是如何建立和部署其他平台之應用程式的方法。However, it does not cover all the configuration options, or how to create and deploy applications for other platforms.

如需與每個平台相關的特定詳細資料,請參閱下列其中一個主題:For specific details that are relevant to each platform, see one of the following topics:

如果您已經熟悉 Configuration Manager 應用程式,則可以略過這個主題。If you are already familiar with Configuration Manager applications, you can skip this topic. 不過,您可以檢閱建立應用程式,來了解建立和部署應用程式時可用的所有選項。However, you might want to review Create applications to learn about all the options that are available when you create and deploy applications.

在您開始使用 Intune 之前Before you start

請確定您已檢閱應用程式管理簡介中的資訊,以備妥您的站台來安裝應用程式,而且您了解本主題中所使用的術語。Make sure that you've reviewed the information in Introduction to application management so that you have prepared your site to install applications and you understand the terminology that's used in this topic.

也請確定 Contoso.msi 應用程式的安裝檔案位於網路上可存取的位置。Also, make sure that the installation files for the Contoso.msi app are in an accessible location on your network.

建立 Configuration Manager 應用程式Create the Configuration Manager application

啟動建立應用程式精靈以及建立應用程式To start the Create Application Wizard and create the application

  1. 在 Configuration Manager 主控台中,選擇 [軟體程式庫] > [應用程式管理] > [應用程式] 。In the Configuration Manager console, choose Software Library > Application Management > Applications.

  2. 在 [常用] 索引標籤的 [建立] 群組中,按一下 [建立應用程式] 。On the Home tab, in the Create group, choose Create Application.

  3. 在 [建立應用程式精靈] 的 [一般] 頁面上,選擇 [從安裝檔案自動偵測此應用程式的相關資訊] 。On the General page of the Create Application Wizard, choose Automatically detect information about this application from installation files. 這會利用從安裝 .msi 檔案中擷取的資訊,預先填入精靈中的部分資訊。This pre-populates some of the information in the wizard with information that's extracted from the installation .msi file. 接著,指定下列資訊:Then specify the following information:

    • 類型:選擇 [Windows Installer (*.msi 檔案)] 。Type: Choose Windows Installer (*.msi file).

    • 位置:鍵入安裝檔 Contoso.msi 的位置 (或選擇 [瀏覽] 以選取位置)。Location: Type the location (or choose Browse to select the location) of the installation file Contoso.msi. 請注意,必須以 \\Server\Share\File 格式指定位置,Configuration Manager 才能找到安裝檔。Note that the location must be specified in the form \\Server\Share\File for Configuration Manager to locate the installation files.

    您將會得到類似下列的螢幕擷取畫面:You'll end up with something that looks like the following screenshot:

    應用程式管理精靈一般頁面

  4. 選擇 [下一步] 。Choose Next. 在 [匯入資訊] 頁面上,您會看到應用程式以及已匯入至 Configuration Manager 之任何相關聯檔案的相關資訊。On the Import Information page, you'll see some information about the app and any associated files that were imported to Configuration Manager. 完成之後,再次選擇 [下一步] 。Once you are done, choose Next again.

  5. 在 [一般資訊] 頁面上,您可以提供應用程式的進一步資訊,協助您在 Configuration Manager 主控台中排序並找到它。On the General Information page, you can supply further information about the application to help you sort and locate it in the Configuration Manager console.

    此外,[安裝程式] 欄位可讓您指定將用來在電腦上安裝應用程式的完整命令列。Additionally, the Installation program field lets you specify the full command line that will be used to install the application on PCs. 您可以編輯這個檔案來新增自己的屬性 (例如 /q 表示自動安裝)。You can edit this to add your own properties (for example /q for an unattended installation).

    提示

    在匯入應用程式安裝檔時,可能已自動填入精靈的這個頁面上的部分欄位。Some of the fields on this page of the wizard might have been filled in automatically when you imported the application installation files.

    您所得到的畫面將類似下列的螢幕擷取畫面:You'll end up with a screen that looks similar to the following screenshot:

    應用程式管理精靈一般資訊頁面

  6. 選擇 [下一步] 。Choose Next. 在 [摘要] 頁面上,您可以確認應用程式設定,然後完成精靈。On the Summary page, you can confirm your application settings and then complete the wizard.

    您已完成建立應用程式。You've finished creating the app. 若要找到它,請在 [軟體程式庫] 工作區中,展開 [應用程式管理] ,然後選擇 [應用程式] 。To find it, in the Software Library workspace, expand Application Management, and then choose Applications. 在這個範例中,您將看到:For this example, you'll see:

    最終應用程式圖形

檢查應用程式和其部署類型的內容Examine the properties of the application and its deployment type

現在,您已經建立應用程式,可視需要來精簡應用程式設定。Now that you've created an application, you can refine the application settings if you need to. 若要查看應用程式內容,請選取應用程式,然後在 [首頁] 索引標籤的 [內容] 群組中選擇 [內容] 。To look at the application properties, select the app, and then, in the Home tab in the Properties group, choose Properties.

在 [<Contoso> 應用程式內容] 對話方塊中,您將看到許多可設定來精簡應用程式行為的項目。In the <Contoso> Application Properties dialog box, you'll see many items that you can configure to refine the behavior of the application. 如需可設定之所有設定的詳細資料,請參閱建立應用程式For details about all the settings you can configure, see Create applications. 這個範例旨在讓您只變更應用程式部署類型的某些內容。For the purposes of this example, you'll just be changing some properties of the application's deployment type.

選擇 [部署類型] 索引標籤 > [Contoso 應用程式] 部署類型 > [編輯] 。Choose the Deployment Types tab > Contoso Application deployment type > Edit.

您會看到與下列類似的對話方塊:You'll see a dialog box like this one:

應用程式管理應用程式內容頁面

新增部署類型的需求Add a requirement to the deployment type

需求指定必須符合條件才可以在裝置上安裝應用程式。Requirements specify conditions that must be met before an application is installed on a device. 您可以從內建需求中選擇,也可以建立您自己的需求。You can choose from built-in requirements or you can create your own. 在這個範例中,您要新增應用程式只會在執行 Windows 10 的電腦上安裝的需求。In this example, you add a requirement that the application will only get installed on PCs that are running Windows 10.

  1. 從剛開啟的部署類型內容頁面中,選擇 [需求] 索引標籤。From the deployment type properties page you just opened, choose the Requirements tab.

  2. 選擇 [新增] 以開啟 [建立需求] 對話方塊。Choose Add to open the Create Requirement dialog box.

  3. 在 [建立需求] 對話方塊中,指定下列資訊:In the Create Requirement dialog box, specify the following information:

    • 類別裝置Category: Device

    • 條件作業系統Condition: Operating system

    • 規則類型Rule type: Value

    • 運算子其中一個Operator: One of

    • 從作業系統清單中,選取 [Windows 10] 。From the operating systems list, select Windows 10.

    最後的對話方塊會像下列對話方塊:You'll end up with a dialog box that looks like this:

    應用程式管理需求頁面

  4. 選擇 [確定] 以關閉您開啟的每個內容頁。Choose OK to close each property page that you opened. 接著返回 Configuration Manager 主控台中的 [應用程式] 清單。Then return to the Applications list in the Configuration Manager console.

提示

需求有助於減少您需要的 Configuration Manager 集合數目。Requirements can help reduce the number of Configuration Manager collections you need. 因為您剛才指定應用程式只能安裝在執行 Windows 10 的電腦上,所以稍後可將這個應用程式部署到包含執行許多不同作業系統的電腦集合。Because you just specified that the application can only get installed on PCs that are running Windows 10, you can later deploy this to a collection that contains PCs that run many different operating systems. 但是,應用程式將只會安裝於 Windows 10 電腦上。But the application will only get installed on Windows 10 PCs.

將應用程式內容新增至發佈點Add the application content to a distribution point

接下來,若要將應用程式部署到電腦,請確定會將應用程式內容複製到發佈點。Next, to deploy the application to PCs, make sure that the application content is copied to a distribution point. 電腦會存取發佈點來安裝應用程式。PCs access the distribution point to install the application.

提示

若要深入了解 Configuration Manager 中的發佈點和內容管理,請參閱管理內容與內容基礎結構To find out more about distribution points and content management in Configuration Manager, see Manage content and content infrastructure.

  1. 在 Configuration Manager 主控台中,選擇 [軟體程式庫] 。In the Configuration Manager console, choose Software Library.

  2. 在 [軟體程式庫] 工作區中,展開 [應用程式] 。In the Software Library workspace, expand Applications. 然後,在應用程式清單中,選取您所建立的 [Contoso 應用程式] 。Then, in the list of applications, select the Contoso Application that you created.

  3. 在 [首頁] 索引標籤的 [部署] 群組中,選擇 [發佈內容] 。On the Home tab, in the Deployment group, choose Distribute Content.

  4. 在 [發佈內容精靈] 的 [一般] 頁面上,確認應用程式名稱正確,然後選擇 [下一步] 。On the General page of the Distribute Content Wizard, check that the application name is correct, and then choose Next.

  5. 在 [內容] 頁面上,檢閱將複製到發佈點的資訊,然後選擇 [下一步] 。On the Content page, review the information that will be copied to the distribution point, and then choose Next.

  6. 在 [內容目的地] 頁面上,選擇 [新增] ,以選取一或多個發佈點,或要在其上安裝應用程式內容的發佈點群組。On the Content Destination page, choose Add to select one or more distribution points, or distribution point groups on which to install the application content.

  7. 完成精靈。Complete the wizard.

您可以檢查應用程式內容已從 [監視] 工作區 (位於 [發佈狀態] > [內容狀態] 下方) 成功複製到發佈點。You can check that the application content was copied successfully to the distribution point from the Monitoring workspace, under Distribution Status > Content Status.

部署應用程式Deploy the application

接下來,將應用程式部署至階層中的裝置集合。Next, deploy the application to a device collection in your hierarchy. 在此範例中,您會將應用程式部署到 [所有系統] 裝置集合。In this example, you deploy the application to the All Systems device collection.

提示

請記住,因為您先前選取的需求,所以只有 Windows 10 電腦才會安裝應用程式。Remember that only Windows 10 computers will install the application because of the requirements that you selected earlier.

  1. 在 Configuration Manager 主控台中,選擇 [軟體程式庫] > [應用程式管理] > [應用程式] 。In the Configuration Manager console, choose Software Library > Application Management > Applications.

  2. 從應用程式清單中,選取您先前建立的應用程式 ([Contoso 應用程式] ),然後在 [首頁] 索引標籤的 [部署] 群組中,選擇 [部署] 。From the list of applications, select the application that you created earlier (Contoso Application), and then, on the Home tab in the Deployment group, choose Deploy.

  3. 在 [部署軟體精靈] 的 [一般] 頁面上,選擇 [瀏覽] 以選取 [所有系統] 裝置集合。On the General page of the Deploy Software Wizard, choose Browse to select the All Systems device collection.

  4. 在 [內容] 頁面上,確認已選取您想要電腦從中安裝應用程式的發佈點。On the Content page, check that the distribution point from which you want PCs to install the application is selected.

  5. 在 [部署設定] 頁面上,確認將部署動作設為 [安裝] ,並將部署目的設為 [必要] 。On the Deployment Settings page, make sure that the deployment action is set to Install, and the deployment purpose is set to Required.

    提示

    您可以藉由將部署目的設為 [必要] ,來確定應用程式已安裝在符合所設定需求的電腦上。By setting the deployment purpose to Required, you make sure that the application is installed on PCs that meet the requirements that you set. 如果您將此值設為 [可用] ,則使用者可以視需要從軟體中心安裝應用程式。If you set this value to Available, then users can install the application on demand from Software Center.

  6. 在 [排程] 頁面上,您可以設定應用程式的安裝時間。On the Scheduling page, you can configure when the application will be installed. 在此範例中,選取 [可用時間之後越快越好] 。For this example, select As soon as possible after the available time.

  7. 在 [使用者體驗] 頁面上,選擇 [下一步] 以接受預設值。On the User Experience page, choose Next to accept the default values.

  8. 完成精靈。Complete the wizard.

使用下面監視應用程式一節中的資訊,來查看您應用程式部署的狀態。Use the information in the following Monitor the application section to see the status of your application deployment.

監視應用程式Monitor the application

在本節中,您將快速查看剛剛所部署應用程式的部署狀態。In this section, you'll take a quick look at the deployment status of the application that you just deployed.

檢閱部署狀態To review the deployment status

  1. 在 Configuration Manager 主控台中,選擇 [監視] > [部署] 。In the Configuration Manager console, choose Monitoring > Deployments.

  2. 從部署清單中,選取 [Contoso 應用程式] 。From the list of deployments, select Contoso Application.

  3. 在 [首頁] 索引標籤的 [部署] 群組中,按一下 [檢視狀態] 。On the Home tab, in the Deployment group, choose View Status.

  4. 選取下列其中一個索引標籤,以查看更多關於應用程式部署的狀態更新:Select one of the following tabs to see more status updates about the application deployment:

    • 成功:已在指定的電腦上成功安裝應用程式。Success: The application installed successfully on the indicated PCs.

    • 進行中:應用程式尚未完成安裝。In Progress: The application has not yet finished installing.

    • 錯誤:在指定的電腦上安裝應用程式時發生錯誤。Error: An error occurred installing the application on the indicated PCs. 也會顯示錯誤的進一步資訊。Further information about the error is also displayed.

    • 不符合需求:未在指定的裝置上進行任何安裝嘗試,原因是它們不符合您所設定的需求 (在此範例中,原因是它們未執行 Windows 10)。Requirements Not Met: No installation attempt was made on the indicated devices because they did not meet the requirements you configured (in this example, because they do not run on Windows 10).

    • 未知:Configuration Manager 無法報告部署狀態。Unknown: Configuration Manager was unable to report the status of the deployment. 請稍後再試。Check back again later.

提示

有數種方式可以監視應用程式部署。There are a few ways you can monitor application deployments. 如需完整詳細資訊,請參閱監視應用程式For full details, see Monitor applications.

使用者體驗End-user experience

具有由 Configuration Manager 所管理且執行 Windows 10 之電腦的使用者會看到一則訊息,告知他們必須安裝 Contoso 應用程式。Users who have PCs that are managed by Configuration Manager and running Windows 10 see a message telling them that they must install the Contoso application. 當他們接受安裝之後,即會安裝應用程式。Once they accept the installation, the application gets installed.

從 Configuration Manager 1906 版開始,新軟體已可用通知只會針對指定應用程式和修訂的使用者顯示一次。Starting in Configuration Manager version 1906, the New Software is Available notification will only show once for a user for a given application and revision. 使用者將不會再於每次登入時都看到通知。The user will no longer see the notification each time they sign in. 如果應用程式已變更或重新部署,則使用者只會看到應用程式的另一個通知。They'll only see another notification for an application if the application has changed or was redeployed.

後續步驟Next steps

監視應用程式Monitor applications