I have developed an UWP launcher app that can launch other UWP apps. It works fine in a normal Windows 10 account (not kiosk).
The code to launch the UWP applications:
private async void RunApplication(string appURI)
{
Uri uri = new Uri(appURI);
try
{
bool result = await Windows.System.Launcher.LaunchUriAsync(uri);
if (!result)
{
_logger.LogErrorWithTime("Error on lauching application " + appURI);
}
else
{
_logger.LogInfoWithTime("Application " + appURI + " was launched sucessfully.");
}
}
catch( Exception e )
{
_logger.LogErrorWithTime("Error on opening app uri " + appURI, e );
}
}
When I run it in a Kiosk account, windows does not allow the launcher to launch others UWP applications, even the Windows Calculator, that is a not restricted UWP app.
Is there a way to run an UWP launcher on Kiosk mode that is allowed to launch other UWP applications?
I am running at a desktop computer, Intel i7 64 bits, with Windows 10 Pro, version 22H2.
I have turned off all windows security configurations as Anti-virus, firewall, etc...
I have done some extra configurations on Windows, like this PowerShell script below, but it did not work as well.
# Define the account user name and the account path
$KioskUserName = "JohnKiosk"
$KioskUserFolderPath = "C:\Users\$($KioskUserName)"
Write-Host "Setting up the Kiosk mode multiple applications to the user $UserName."
# Set the user model Id for the UWP application
$UWPAppUserModelId = "App1_0q5sqegcbs4qe!App"
# Set the registry key where the configurations are applyed
$RegistryPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\$KioskUserName"
# Set the key registry for the Kiosk account
New-Item -Path $RegistryPath -Force | Out-Null
# Set the Registry key to start the UWP application on the kiosk account
Set-ItemProperty -Path $RegistryPath -Name "Shell" -Value "explorer.exe shell:AppsFolder\$UWPAppUserModelId"
# Set the list of allowed applications on the kiosk account
$AllowedApps = @(
"App1_0q5sqegcbs4qe!App",
"App2_0q5sqegcbs4qe!App",
"App3_0q5sqegcbs4qe!App",
"Microsoft.WindowsCalculator_8wekyb3d8bbwe!App",
)
# SEt the registry key where the configurations are applyed
$RegistryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AssignedAccess\$KioskUserName"
# Create the registry key to the target user
New-Item -Path $RegistryPath -Force | Out-Null
# Set the subkey 'AllowedApps'
$AllowedAppsPath = "$RegistryPath\AllowedApps"
New-Item -Path $AllowedAppsPath -Force | Out-Null
# Set the registry values
Set-ItemProperty -Path $RegistryPath -Name "IsAssignedAccess" -Value 1
Set-ItemProperty -Path $RegistryPath -Name "DisplayName" -Value $KioskUserName
Set-ItemProperty -Path $RegistryPath -Name "User" -Value $KioskUserName
# Set the allowed applications on the subkey "AllowedApps"
$AllowedApps | ForEach-Object {
New-ItemProperty -Path $AllowedAppsPath -Name $_ -Value "" -PropertyType String -Force | Out-Null
}
# Set all possible permissions to the Kiosk account (be carefull here )
icacls $KioskUserFolderPath /grant "$KioskUserName`:(OI`)(CI`)F" /T /C /Q
Write-Host "The kiosk account mode with multiple applications was applyed to the $KioskUserName."