Share via


快速入門:使用Shell Launcher 設定 kiosk體驗

本快速入門提供如何使用Shell Launcher 在 Windows 上設定 kiosk 體驗 的實用範例。 這些範例說明使用行動裝置管理解決方案 (MDM) 的步驟,例如 Microsoft Intune 和 PowerShell。 雖然使用不同的解決方案,但組態設定和結果都相同。

您可以修改這些範例,以符合您的特定需求。 例如,您可以變更使用的應用程式、開啟 Microsoft Edge 時指定的 URL,或變更自動登入 Windows 的使用者名稱。

必要條件

以下是完成本快速入門的需求清單:

  • Windows 企業版或教育版裝置
  • 如果您想要使用 MDM 設定設定,請 Microsoft Intune 或非 Microsoft MDM 解決方案
  • 如果您想要使用 Windows PowerShell 測試組態,請存取 psexec 工具

設定 kiosk 裝置

下列指示提供如何設定裝置的詳細數據。 選取最符合您需求的選項。

提示

使用下列 Graph 呼叫,在您的 Microsoft Intune 租用戶中自動建立自定義原則,而不需要指派或範圍標籤。

使用此呼叫時,請在 [圖形總管] 視窗中向您的租用戶進行驗證。 如果這是第一次使用 Graph 總管,您可能需要授權應用程式存取您的租使用者或修改現有的許可權。 此圖形呼叫需要 DeviceManagementConfiguration.ReadWrite.All 許可權。

POST https://graph.microsoft.com/beta/deviceManagement/deviceConfigurations
Content-Type: application/json

{ "id": "00-0000-0000-0000-000000000000", "displayName": "_MSLearn_Example_Kiosk - Shell Launcher", "description": "This is a sample policy created from an article on learn.microsoft.com.", "roleScopeTagIds": [ "0" ], "@odata.type": "#microsoft.graph.windows10CustomConfiguration", "omaSettings": [ { "@odata.type": "#microsoft.graph.omaSettingString", "displayName": "ShellLauncher", "description": null, "omaUri": "./Vendor/MSFT/AssignedAccess/ShellLauncher", "secretReferenceValueId": null, "isEncrypted": true, "value": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ShellLauncherConfiguration\nxmlns=\"http://schemas.microsoft.com/ShellLauncher/2018/Configuration\"\nxmlns:V2=\"http://schemas.microsoft.com/ShellLauncher/2019/Configuration\">\n    <Profiles>\n        <DefaultProfile>\n            <Shell Shell=\"%SystemRoot%\\explorer.exe\"/>\n        </DefaultProfile>\n        <Profile Id=\"{EDB3036B-780D-487D-A375-69369D8A8F78}\">\n            <Shell Shell=\"%ProgramFiles(x86)%\\Microsoft\\Edge\\Application\\msedge.exe --kiosk https://www.contoso.com --edge-kiosk-type=fullscreen --kiosk-idle-timeout-minutes=2\" V2:AppType=\"Desktop\" V2:AllAppsFullScreen=\"true\">\n                <ReturnCodeActions>\n                    <ReturnCodeAction ReturnCode=\"0\" Action=\"RestartShell\"/>\n                    <ReturnCodeAction ReturnCode=\"-1\" Action=\"RestartDevice\"/>\n                    <ReturnCodeAction ReturnCode=\"255\" Action=\"ShutdownDevice\"/>\n                </ReturnCodeActions>\n                <DefaultAction Action=\"RestartShell\"/>\n            </Shell>\n        </Profile>\n    </Profiles>\n    <Configs>\n        <Config>\n            <AutoLogonAccount/>\n            <Profile Id=\"{EDB3036B-780D-487D-A375-69369D8A8F78}\"/>\n        </Config>\n    </Configs>\n</ShellLauncherConfiguration>" } ], }

將原則指派給包含 為您要設定之裝置成員的群組。

或者,您可以使用 自定義 原則搭配 AssignedAccess CSP 來設定裝置。

  • 設定:./Vendor/MSFT/AssignedAccess/ShellLauncher
  • 價值:
<?xml version="1.0" encoding="utf-8"?>
<ShellLauncherConfiguration
xmlns="http://schemas.microsoft.com/ShellLauncher/2018/Configuration"
xmlns:V2="http://schemas.microsoft.com/ShellLauncher/2019/Configuration">
    <Profiles>
        <DefaultProfile>
            <Shell Shell="%SystemRoot%\explorer.exe"/>
        </DefaultProfile>
        <Profile Id="{EDB3036B-780D-487D-A375-69369D8A8F78}">
            <Shell Shell="%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe --kiosk https://www.contoso.com --edge-kiosk-type=fullscreen --kiosk-idle-timeout-minutes=2" V2:AppType="Desktop" V2:AllAppsFullScreen="true">
                <ReturnCodeActions>
                    <ReturnCodeAction ReturnCode="0" Action="RestartShell"/>
                    <ReturnCodeAction ReturnCode="-1" Action="RestartDevice"/>
                    <ReturnCodeAction ReturnCode="255" Action="ShutdownDevice"/>
                </ReturnCodeActions>
                <DefaultAction Action="RestartShell"/>
            </Shell>
        </Profile>
    </Profiles>
    <Configs>
        <Config>
            <AutoLogonAccount/>
            <Profile Id="{EDB3036B-780D-487D-A375-69369D8A8F78}"/>
        </Config>
    </Configs>
</ShellLauncherConfiguration>

使用者體驗

套用設定之後,請重新啟動裝置。 本機用戶帳戶會自動登入,並開啟 Microsoft Edge。

後續步驟

深入瞭解如何建立Shell Launcher 組態檔:

建立殼層啟動器組態檔