-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running as a Service #185
Comments
I don't think this is something that screenshot-desktop can fix. However, the page you linked to clearly outlines how you can fix it for your application:
Alternatively you can create the second process using the Windows API function "CreateProcessAsUser". |
Why?
Yes, that's obvious solution and what I did ) |
"can't fix" was probably the wrong formulation. "shouldn't fix" is probably a better way to put it. Now, I'm not the owner of this repo, so this is really just my personal opinon. But as a user of this library I wouldn't expect this library to create processes as another user if it's running as a service. I think Microsoft intentionally prevents services from accessing these things directly and I wouldn't expect this library to circumvent this behavior. It should be clearly documented in either case though. Creating a process as another user probably also has some non-obvious security implications that should be cleared up first. Personally I believe that this niche is better filled by another library. |
@bladerunner2020 |
If you run application under a user session (after login) by putting it to autostart not as a service then everything is fine. Just not run it as a service. ))) |
@bladerunner2020 Hi, thank. If run from the user, the nodejs console will be visible, |
After reading around this on and off for a while I'm afraid I've decided this isn't something to include in the library as mostly restricted by the security setup on OSs. As per previous comments, I'd recommend running something at user login. If it's still necessary for your app, I'd be very happy to review a PR but won't be working on this myself. |
When you try to get screenshot in application that is run as a Windows service you get a black screen. This issues was described in #134 and there is also explanation why is it. I read https://docs.microsoft.com/en-us/windows/win32/services/interactive-services but it didn't help. So I believe that something should be changed in the module to interact with user desktop when running as a windows service.
The text was updated successfully, but these errors were encountered: