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

前端 未结 8 591
攒了一身酷
攒了一身酷 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

    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

提交回复
热议问题