Starting a Windows service in an interactive session

后端 未结 5 2068
时光说笑
时光说笑 2020-12-05 08:42

A colleague has a batch script program which needs to to run on a Windows Server in console mode, so that it has access to a Windows interactive session. The server is reboo

5条回答
  •  情歌与酒
    2020-12-05 09:24

    In case "Interact with desktop" on the service is not enough (I have seen a handful of cases where it is not), you can combine it with AutoAdminLogon. Create three (or four for a domain) REG_SZ values under HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon:

    • DefaultUsername
    • DefaultPassword
    • DefaultDomain
    • AutoAdminLogon

    AutoAdminLogon should be set to the string "1", the others are self-explanatory.

    Obviously this has security issues big enough to fly Jupiter through.

提交回复
热议问题