Writing XML code for multi-app kiosk for Windows desktop - windows

I'm trying to create multi-app kiosk for one of our computer in the office running Windows 10 pro.
It works with Microsoft apps such as Calculator, Internet Explorer, but I'm trying to create one for one of our in-house app and it didn't work. When in kiosk mode, it came up with the app button but with a text of the location to the app itself (eg: W~C:\path\to\app\app.exe - I don't know what W~ means). And when I click on it, nothing happens. With multi-app kiosk, you have to write an XML file to allow which app to run:
<Profiles>
<Profile Id="{some id}">
<AllAppsList>
<AllowedApps>
<App DesktopAppPath="C:\path\to\app\app.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="TAS">
<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationID="C:\path\to\app\app.exe" />
</start:Group>
</defaultlayout:StartLayout>
</StartLayoutCollection>
</DefaultLayoutOverride>
</LayoutModificationTemplate>
]]>
</StartLayout>
</Profile>
</Profiles>
I was just wondering if there's something that you need to set in the <App> tag to specify the library path/working folder? Is there any documentation about on how to write XML files for multi-app kiosk? I found this on the Microsoft website but not in details:
https://learn.microsoft.com/en-us/windows/configuration/lock-down-windows-10-to-specific-apps

Related

Error applying provisioning package for multi-app kiosk

I am setting up a multi-app kiosk in audit mode on a fresh install of Win 10 IoT Ent LTSC 1809.
I've create an XML assigned access file based on: https://learn.microsoft.com/en-us/windows/configuration/lock-down-windows-10-to-specific-apps
<?xml version="1.0" encoding="utf-8" ?>
<AssignedAccessConfiguration
xmlns="https://schemas.microsoft.com/AssignedAccess/2017/config"
xmlns:rs5="https://schemas.microsoft.com/AssignedAccess/201810/config"
>
<Profiles>
<Profile Id="{75C4578C-D56D-402A-A946-CA3CCA60633A}">
<AllAppsList>
<AllowedApps>
<App DesktopAppPath="C:\Windows\system32\mspaint.exe"/>
<App DesktopAppPath="C:\Windows\System32\notepad.exe"/>
</AllowedApps>
</AllAppsList>
<StartLayout>
<![CDATA[<LayoutModificationTemplate xmlns:defaultlayout="https://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="https://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="httsp://schemas.microsoft.com/Start/2014/LayoutModification">
<LayoutOptions StartTileGroupCellWidth="4" />
<DefaultLayoutOverride>
<StartLayoutCollection>
<defaultlayout:StartLayout GroupCellWidth="4">
<start:Group Name="Group1">
<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accessories\Paint.lnk" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\Accessories\Notepad.lnk" />
</start:Group>
</defaultlayout:StartLayout>
</StartLayoutCollection>
</DefaultLayoutOverride>
</LayoutModificationTemplate>
]]>
</StartLayout>
<Taskbar ShowTaskbar="true"/>
</Profile>
</Profiles>
<Configs>
<Config>
<AutoLogonAccount rs5:DisplayName="Hello World"/>
<DefaultProfile Id="{75C4578C-D56D-402A-A946-CA3CCA60633A}"/>
</Config>
</Configs>
</AssignedAccessConfiguration>
I've then used ICD to create a provisioning package using this XML file. When I try applying the package, I get an error and the following event log:
ProvXML category 'UxLockdown' failed with '0xC00CE223' at CSP node
'AssignedAccess/Configuration'. Provisioning failed
From researching this error online, there may be an error in my XML file. I've gone over it a few times and validated against the schema but still getting this error.
Can anyone provide help?
change
xmlns="https://schemas.microsoft.com/AssignedAccess/2017/config"
xmlns:rs5="https://schemas.microsoft.com/AssignedAccess/201810/config"
to
xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config"
xmlns:rs5="http://schemas.microsoft.com/AssignedAccess/201810/config"
its http not https, yes M$ had me running around in circles on this one

Problem running ClickOnce application in Windows 10 multi-app kiosk mode

I’m trying to set up a Windows 10 multi-app kiosk configuration running a ClickOnce application. I’m following the Microsoft guide https://learn.microsoft.com/en-us/windows/configuration/lock-down-windows-10-to-specific-apps
It works until the ClickOnce application is updated after this it’s not possible run the application.
The problem is the path C:\Users\Musikspelare\AppData\Local\Apps\2.0\EBQ78BLC.1MN\0J3M24G5.KRQ\danc..tion_57ca62a9d061b04b_0002.0000_6fffc994766df618\DancePlayer.exe to the ClickOnce application under the section as this path changes after the application is updated.
Is there any other way of doing this for a ClickOnce application?
The XML configuration file for the multi-app kiosk setup looks as below:
<?xml version="1.0" encoding="utf-8" ?>
<AssignedAccessConfiguration
xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config"
xmlns:rs5="http://schemas.microsoft.com/AssignedAccess/201810/config"
>
<Profiles>
<Profile Id="{AFF9DA33-AE89-4039-B646-3A5706E92957}">
<AllAppsList>
<AllowedApps>
<App AppUserModelId="SpotifyAB.SpotifyMusic_zpdnekdrzrea0!Spotify"/>
<App DesktopAppPath="%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe"/>
<App DesktopAppPath="C:\Users\Musikspelare\AppData\Local\Apps\2.0\EBQ78BLC.1MN\0J3M24G5.KRQ\danc..tion_57ca62a9d061b04b_0002.0000_6fffc994766df618\DancePlayer.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:Tile Size="2x2" Column="0" Row="0" AppUserModelID="SpotifyAB.SpotifyMusic_zpdnekdrzrea0!Spotify" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk" />
<start:DesktopApplicationTile Size="2x2" Column="3" Row="0" DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\DancePlayer\DancePlayer.appref-ms" />
</start:Group>
</defaultlayout:StartLayout>
</StartLayoutCollection>
</DefaultLayoutOverride>
</LayoutModificationTemplate>
]]>
</StartLayout>
<Taskbar ShowTaskbar="true"/>
</Profile>
</Profiles>
<Configs>
<Config>
<Account>Musikspelare</Account>
<DefaultProfile Id="{AFF9DA33-AE89-4039-B646-3A5706E92957}"/>
</Config>
</Configs>
</AssignedAccessConfiguration>
I also ran into this issue. Fortunately, multi-app kiosk mode utilizes AppLocker to allow the apps listed under the "AllowedApps" tag. You can use an asterisk (*) as a wildcard in your filepaths to include arbitrary paths that are generated from ClickOnce applications. You would make the following adjustment to your code:
<App DesktopAppPath="%OSDrive%\Users\Musikspelare\AppData\Local\Apps\2.0\*\danc..tion_57ca62a9d061b04b_0002.0000_6fffc994766df618\DancePlayer.exe"/>
You should also include the AMUID of the app as it's listed from the Get-StartApps cmdlet to the "AllowedApps" list.
I haven't been able to test whether the AMUID looking portion of that path, "danc..tion_57ca62a9d061b04b_0002.0000_6fffc994766df618" is generated as part of the install or if it's a GUID. It may also change when the ClickOnce apps updates, if that's the case, just remove that portion from the path and it should take care of it.
And for anybody using Intune, I wasn't able to include an asterisk in the path for a multi-app setup under the Kiosk Template. You will have to create a profile that includes the AssignedAccess policy and add your own XML.
https://learn.microsoft.com/en-us/windows/client-management/mdm/assignedaccess-csp

How to launch program at login

I have created a msix package with the desktop bridge tool provided by microsoft and I want after the installation to see the program to start every time the user log in (launch at startup)
I have modified the manifest file of the msix file and included an extension code as described in this post:
https://blogs.msdn.microsoft.com/appconsult/2017/02/23/supporting-launch-at-startup-in-a-desktop-app-converted-with-the-desktop-bridge/
<Applications>
<Application Id="MyApp" Executable="MyApp.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements BackgroundColor="transparent" DisplayName="Safeplace" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="Safeplace">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" Square310x310Logo="Assets\Square310x310Logo.png" Square71x71Logo="Assets\Square71x71Logo.png" />
</uap:VisualElements>
<Extensions>
<desktop:Extension Category="windows.startupTask" Executable="myapp.exe" EntryPoint="Windows.FullTrustApplication">
<desktop:StartupTask TaskId="Myapp" Enabled="true" DisplayName="My app" />
</desktop:Extension>
</Extensions>
</Application>
When the user login, I have this error message (translated from french) :
Windows can't find 'C:\Program Files\app_1.0.1.0__cghhgghh\myapp.exe'.Please check that you have entered the correct name then retry.
And indeed when you search in this folder the exe file is effictively not at this place. The correct path is C:\Program Files\app_1.0.1.0__cghhgghh\VFS\ProgramFilesX86\safeplace\

How to pass args to a UWP Application with EntryPoint="Windows.FullTrustApplication" in AppxManifest.xml

I am trying to set up an AppxManifest.xml to launch a Win32 application as a full trust application. Using the snippet below, I am able to Add-AppxPackage -Register AppxManifest.xml and then use Debug > Other Debugging Tools > Debug Installed Application to debug the application in Visual Studio 2017.
However, I want to pass some arguments to the application when launching it. How can I acomplish this? I don't mind listing them in the AppxManifest.xml if that is easiest, I just need to know how.
...
<Applications>
<Application Id="App" Executable="SomeExecutable.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements DisplayName="Wrap" Description="Wrap" BackgroundColor="transparent" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" />
</uap:VisualElements>
</Application>
</Applications>
...
Protocol associations is what you look for:
Protocol associations can enable other programs and system components
to interoperate with your packaged app. When your packaged application
is started by using a protocol, you can specify specific parameters to
pass to its activation event arguments so it can behave accordingly.
Parameters are supported only for packaged, full-trust apps.
<Package
xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
IgnorableNamespaces="uap3, desktop">
<Applications>
<Application>
<Extensions>
<uap3:Extension
Category="windows.protocol">
<uap3:Protocol
Name="myapp-cmd"
Parameters="/p " />
</uap3:Extension>
</Extensions>
</Application>
</Applications>
</Package>

Is there a way to make an installer which can install multiple msis downloading from internet?

Just like WiX installer, I wanna distribute a small setup.exe, while installing, the setup.exe can download the demanded msis from a specified server.
If anyone know how to do, code sample is better.
The below codes can be compiled successfully, but the WixBA UI doesn't display.
<?xml version="1.0" encoding="UTF-8"?>
<BootstrapperApplicationRef Id='ManagedBootstrapperApplicationHost'>
<Payload Name='BootstrapperCore.config' SourceFile='WixBA.BootstrapperCore.config' />
<Payload SourceFile='WixBA.dll' />
<Payload SourceFile='License.htm' />
</BootstrapperApplicationRef>
<Variable Name='InstallFolder' Type='string' Value='[ProgramFilesFolder]Test' />
<Chain>
<MsiPackage Id='sevenz' Vital='yes' Name='data\7z.msi' SourceFile='data\7z.msi' >
<MsiProperty Name='INSTALLFOLDER' Value='[InstallFolder]' />
</MsiPackage>
</Chain>
</Bundle>
The WiX toolset supports this using the Burn engine. The source code is all available in src\burn\engine (in particular, you'll want to look at downloadengine.cpp).

Resources