Запуск службы Windows на интерактивной сессии

У меня была эта ошибка - глупая ошибка была, я использовал -p3307 для указания порта, тогда как я должен был использовать -P3307, то есть заглавную P. Маленькое 'p' для пароля arg:)

9
задан raam86 20 July 2013 в 00:26
поделиться

4 ответа

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.

4
ответ дан 4 December 2019 в 23:41
поделиться

Я рекомендую пойти другим путем. Вы можете создать другое приложение для Windows, которое через IPC связывается со службой Windows, и это может быть то, что имеет дело с закрытым приложением souorce. Но при необходимости вы можете указать опцию в сервисе (вы можете сделать это через MMC, реестр и т. Д.). По сути, вы можете увидеть эту опцию, перейдя в Управление компьютером-> Службы и приложения-> Службы-> Щелкните правой кнопкой мыши свою службу-> Изменить учетную запись на локальную систему и установите флажок «Разрешить системе взаимодействовать с рабочим столом».

Однако снова , Рекомендую выбрать другой путь.

0
ответ дан 4 December 2019 в 23:41
поделиться

Have you tried having your script run as a Windows service, but allowing it to interact with the desktop?

Specifically:

  1. Go to the service properties page
  2. Click on the "Log On" tab
  3. Select "Local System account"
  4. Check "Allow service to interact with desktop"
1
ответ дан 4 December 2019 в 23:41
поделиться

I had to do something similar recently; a route that I found but discarded due to security concerns is to have the interactive service set self as running in interactive mode and then run the ImpersonateUser function in the win32 API, which I think will provide the benefits of both a user and the interactive session available from the LocalSystem.

Needless to say, if someone broke into a service that did that, they would have total control of the machine.

0
ответ дан 4 December 2019 в 23:41
поделиться