admin管理员组

文章数量:1302979

My company is working on a Windows Desktop application built with WinUI 3 that we need to run as a public kiosk. Our target machine is running Windows 11 IoT Enterprise LTSC edition. We are creating an .msix package from Visual Studio using a self-signed certificate. When I attempt to put the app into assigned access using PowerShell, the cmdlet runs without error, but when logging into the now kiosk user, we just get a black screen. The mouse cursor shows, we can Ctrl-Alt-Del to return to the lock screen, and files that our app writes to disk are getting written, indicating it has started, but we have no UI.

I go to go to Settings -> Accounts -> Other Users -> Set up a kiosk and follow the prompts, both using an existing user and creating a new user, but the list to select an app does not include our app. We have tried installing the app on the Standard User account, the Admin account, and both, but no luck.

However, we found the PowerShell cmdlet "Set-AssignedAccess" using the -AppUserModelId argument pointed to our app and -UserName set to the standard user account. This will run without error. Then we reboot the machine.

When it comes back up and we log in to the standard user account we get a black screen that only displays the mouse cursor. We can press Ctrl-Alt-Del to return to the lock screen, but nothing else. However, our app writes some files to the local file system after performing an automated login into a server, and these files are present along with our logs that show the app logging, opening to the main page, and generally starting otherwise correctly.

I don't know if there is something in our code that needs to change, or if this is more of an setup issue.

I have created a blank, template app, using the "Blank App, Packaged (WinUI 3 in Desktop)" template in Visual Studio, and simply modified the MainWindow.xaml.cs constructor to write a small text file to disk, and then packaged it with another self-signed cert and followed the same steps as our production app, and I get the same behavior, runs fine running normally, but shows a blank screen running under kiosk/assigned access.

本文标签: Putting a WinUI 3 app into Assigned Access mode on Windows 11 results in a blank screenStack Overflow