Configure a custom ShellLauncher. HELP!!!!

Chiara Borrelli 0 Reputation points
2025-03-31T10:17:45.8933333+00:00

I need to configure a custom ShellLauncher.

I ran the following script on the target computer, but now every time I sign in with my Kiosk user, I just see a black screen:

Create a handle to the class instance so we can call the static methods.

$ShellLauncherClass = [wmiclass]"\localhost\root\standardcimv2\embedded:WESL_UserSetting"

function Get-UsernameSID($AccountName) {

$NTUserObject = New-Object System.Security.Principal.NTAccount($AccountName)

$NTUserSID = $NTUserObject.Translate([System.Security.Principal.SecurityIdentifier])

return $NTUserSID.Value

}

This well-known security identifier (SID) corresponds to the BUILTIN\Administrators group.

#$Admins_SID = "S-1-5-32-544"

Name of Kiosk account

$Kiosk_SID = Get-UsernameSID("Kiosk")

Define actions to take when the shell program exits.

$restart_shell = 0

$restart_device = 1

$shutdown_device = 2

Remove the new custom shells.

$ShellLauncherClass.RemoveCustomShell($Admins_SID)

$ShellLauncherClass.RemoveCustomShell($Kiosk_SID)

Enable Shell Launcher

$ShellLauncherClass.SetEnabled( 1 )

Set the custom shell for the kiosk, and restart the shell if it's closed.

$ShellLauncherClass.SetCustomShell($Kiosk_SID, "C:\Program Files\TEST\Test.exe", ($null), ($null), $restart_shell)

This is the script.
What's the problem?

I've already enabled ShellLauncher as Windows Features (Device Lockdown -> Shell Launcher)
User's image

Windows for business Windows for IoT
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2025-04-01T09:13:54.0966667+00:00

    Hello,

    Thank you for posting in Microsoft Q&A.

    Based on the description, I understand your question is related to Configure a custom ShellLauncher.

    There are two ways you can configure Shell Launcher:

    Using the ShellLauncher node of the Assigned Access Configuration Service Provider (CSP), which also automatically enables Shell Launcher on the device, if the device supports it

    Using the Shell Launcher WMI providers directly in an application. When using this method, you must enable Shell Launcher first

    You can configure the following options for Shell Launcher:

    Add/remove a shell configuration for a specific user or group

    Change the default shell configuration

    Get information on a shell configuration for a specific user or group

    Note

    Any changes don't take effect until a user signs in.

    Reference link:

    https://learn.microsoft.com/en-us/windows/configuration/shell-launcher/configure?tabs=control-panel1%2Cintune

    https://learn.microsoft.com/en-us/windows/configuration/shell-launcher/configuration-file

    Have a nice day.

    Best Regards,

    Molly

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it

    0 comments No comments

  2. Sean Liming 4,766 Reputation points Volunteer Moderator
    2025-04-02T15:51:25.61+00:00

    I created Shell Launcher V1 utilities to configure, enable/disable, and manage Shell Launcher: https://annabooks.com/SW_SLUtility.html

    There is a GUI and command line versions.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.