Reference to undeclared namespace prefix: 'rs5'., ErrorCode(0xC00CE01D) when parsing XML for multi-app kiosk

95 views Asked by At

I'm setting up a multi-app kiosk to autolaunch an MSEdge browser through Microsofts and to : Manual

Currently my XML looks like this:

$nameSpaceName="root\cimv2\mdm\dmmap"
$className="MDM_AssignedAccess"
$obj = Get-CimInstance -Namespace $namespaceName -ClassName $className
Add-Type -AssemblyName System.Web
$obj.Configuration = [System.Web.HttpUtility]::HtmlEncode(@"
<?xml version="1.0" encoding="utf-8" ?>
<AssignedAccessConfiguration
    xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config"
    xmlns:r1809="http://schemas.microsoft.com/AssignedAccess/201810/config"
>
    <Profiles>
        <Profile Id="{bc38b341-6836-449d-ad4f-49672ab8e8a2}">
            <AllAppsList>`your text`
                <AllowedApps>
                    <App DesktopAppPath="C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" r1809:AutoLaunch="true" />
                    <App DesktopAppPath="C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" />
                    <App DesktopAppPath="C:\WINDOWS\SYSTEM32\CMD.EXE" />
                </AllowedApps>
            </AllAppsList>
            <StartLayout>
                <![CDATA[<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
  <LayoutOptions StartTileGroupCellWidth="6" />
  <DefaultLayoutOverride>
    <StartLayoutCollection>
      <defaultlayout:StartLayout GroupCellWidth="6">
        <start:Group Name="">
          <start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationID="Microsoft.InternetExplorer.Default"  />
          <start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\Command Prompt.lnk" />
        </start:Group>
      </defaultlayout:StartLayout>
    </StartLayoutCollection>
  </DefaultLayoutOverride>
</LayoutModificationTemplate>
                ]]>
            </StartLayout>
            <Taskbar ShowTaskbar="true"/>
        </Profile>
    </Profiles>
    <Configs>
        <Config>
            <Account>temp</Account>
            <DefaultProfile Id="{bc38b341-6836-449d-ad4f-49672ab8e8a2}"/>
        </Config>
    </Configs>
</AssignedAccessConfiguration>
"@)
Set-CimInstance -CimInstance $obj

This was done by following Microsoft instructions to include an autorun rule at the end of the path:

<App DesktopAppPath="C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" rs5:AutoLaunch="true" rs5:AutoLaunchArguments="https://Google.com">

However this doesn't work, and results in the following error:

[ERROR] Reference to undeclared namespace prefix: 'rs5'., ErrorCode(0xC00CE01D)

How do i solve this issue?

0

There are 0 answers