How to run an application as shell replacement on Windows 10 Enterprise

前端 未结 8 552
攒了一身酷
攒了一身酷 2020-12-24 03:25

I need to create a special account on a computer running Windows 10 Enterprise. This account would launch an application directly on login instead of the default shell and e

相关标签:
8条回答
  • 2020-12-24 04:03

    Have you tried changing the users shell?

    https://msdn.microsoft.com/en-us/library/ms838576(v=WinEmbedded.5).aspx

    There are a few registry keys you need to set. First one enables the ability to give the user a unique shell, the second one defines the executable that starts instead of explorer.

    0 讨论(0)
  • 2020-12-24 04:03

    I wanted to do something similar, and I borrowed heavily from other answers, but none of them were a complete working answer for me. Here's what I ended up doing.

    1. Create a new user account
    2. Setup the following vbs script (largely inspired by this thread) to launch the shell application and name it something like "launch.vbs"
    set oShell=createobject("wscript.shell") 
    sCmd="d:\launchbox\launchbox.exe" 
    oShell.run sCmd,,true 'true forces it to wait for process to finish 
    sCmd="shutdown /r /t 0" 
    oShell.run sCmd
    
    1. Login as the new user

    2. Run regedit

    3. Add a new string value named Shell to HKEY_Current_User\Software\Microsoft\Windows NT\CurrentVersion\Winlogon with a value of the command that you need to run to execute your script:

    wscript d:\launchbox\launch.vbs
    
    1. Logoff and log back on as the user to see it in action
    0 讨论(0)
  • 2020-12-24 04:05

    I had the same problem right now. And yes, Microsoft has changed the way to do a shell replacement. You can install and use the Embedded Shell Launcher to customize windows as you like it for kiosk mode. But this is only available for Enterprise and Education.

    If you don't want to buy the Enterprise version you can use the already known registry locations in HKCU and HKLM. https://msdn.microsoft.com/en-us/library/ms838576(v=WinEmbedded.5).aspx

    But wait, oh no since Windows 10 it is only possible to use Microsoft signed applications, so your normal .net application isn't started and the screen keeps being black after login. But we've figured out a workaround.

    Just use a Batch-File as bootstrapping. If you set the registry keys you like to a Batch-File and the Batch-File starts the real application, then it works like a charm.

    @echo off
    echo Bootstrapping, please wait ...
    start /b "Bootstrap" "C:\vmwatcher\VMViewClientWatcher.exe"
    
    0 讨论(0)
  • 2020-12-24 04:13

    You can create a Provisioning Package using Windows Configuration Designer. The gui will help in creating a simple shell replacement when you choose 'provision kiosk devices'

    0 讨论(0)
  • 2020-12-24 04:18

    I battled with this one myself. If you look at the notes for Windows 10 Shell Launcher, it only works in the Enterprise or Education version. If you try using this in Home or Pro versions it simply boots to a blank screen. Using the same script in Enterprise, I confirmed works perfectly...

    0 讨论(0)
  • 2020-12-24 04:18

    I ran into the same issue, and that's because the Script from TechNet on how to configure ShellLauncher actually enables, then disables the same Shell!

    # Enable Shell Launcher
    
    $ShellLauncherClass.SetEnabled($TRUE)
    
    $IsShellLauncherEnabled = $ShellLauncherClass.IsEnabled()
    
    "`nEnabled is set to " + $IsShellLauncherEnabled.Enabled
    
    # Remove the new custom shells.
    
    $ShellLauncherClass.RemoveCustomShell($Admins_SID)
    
    $ShellLauncherClass.RemoveCustomShell($Cashier_SID)
    
    # Disable Shell Launcher
    
    $ShellLauncherClass.SetEnabled($FALSE)
    
    $IsShellLauncherEnabled = $ShellLauncherClass.IsEnabled()
    
    "`nEnabled is set to " + $IsShellLauncherEnabled.Enabled
    

    I was lazily just copying and pasting the code and expected it to work.

    If you comment out the final ten lines, this process will work.

    Remember Kids: don't just copy and paste code from Strangers!

    0 讨论(0)
提交回复
热议问题