У меня была эта ошибка - глупая ошибка была, я использовал -p3307
для указания порта, тогда как я должен был использовать -P3307
, то есть заглавную P. Маленькое 'p' для пароля arg:)
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:
AutoAdminLogon should be set to the string "1", the others are self-explanatory.
Obviously this has security issues big enough to fly Jupiter through.
Я рекомендую пойти другим путем. Вы можете создать другое приложение для Windows, которое через IPC связывается со службой Windows, и это может быть то, что имеет дело с закрытым приложением souorce. Но при необходимости вы можете указать опцию в сервисе (вы можете сделать это через MMC, реестр и т. Д.). По сути, вы можете увидеть эту опцию, перейдя в Управление компьютером-> Службы и приложения-> Службы-> Щелкните правой кнопкой мыши свою службу-> Изменить учетную запись на локальную систему и установите флажок «Разрешить системе взаимодействовать с рабочим столом».
Однако снова , Рекомендую выбрать другой путь.
Have you tried having your script run as a Windows service, but allowing it to interact with the desktop?
Specifically:
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.