Windows Service Screen Shoot? - windows

i kind a newbie on windows service programing, my idea is that i want to create a windows service that will take a screen shoot of the desktop client,i mean i want to attach this to a aspx page, the screen shoot code is working 100% but problem is when i trigger windows service after install it, nothing happened.
I debugged it and there was not prp, after that i made a small screenCapture.exe file to do the job and try calling it from the service, all i got was a black screen, tried everything with it and no luck.
Then i read about desktops and stuff like that, but honestly i don't understand any of that, i goggled a lot but no luck so far, problem is that i saw a website that implement this function so it can be done. BUT HOW ??? please help me out cause i am stuck here, and if u do explain good, cause as i told u i am kinda new to this

A service does not have access to the desktop. You might want to create a program that runs when the user is logged in interactively.

Not sure which Windows you are using...but starting with Vista, the ability to interact with desktop from a service has been disabled.

A service will not have access to the desktop. This is done intentionally by Microsoft for better security. The other option you can try is, goto the service properties and give it option to interact with the desktop. This can be done using local user permissions.

Related

how does a vnc server 'service' get around Session 0 isolation (no desktop interaction) in windows 7?

I'm wondering if there is a windows API that gets called or are the developers just wizards? cheers.
I know this question is a bit old, but figured I would post a reply in case anyone was still interested. I followed a method very similar to this to have a service launch an application on the desktop. http://www.developerfusion.com/community/blog-entry/8389765/creating-a-process-in-another-user-session/
You may want to also call LoadUserProfile prior to launching the process.

Why Flash can't be rendered in a Windows Service?

I'm trying to solve a similar problem as was described here - to create a Windows Service for taking snapshots of rich webpages (html+js+flash) and saving them to a PDF file.
The bundle Firefox+cmdlnprint did the trick for me. I wrote a simple program running as a service that invokes Firefox to make a PDF. All seems well, the PDF gets created, but Flash is completely missing. Although, when started not as a service, Flash renders just fine.
Can anyone shed a light on what blocks Flash from rendering and if there's a workaround?
thanks!
I can only shoot into the dark here but two things come to mind:
Who (which user) is your service running as? What happens if you make the service run under the administrator user?
If your service is running on the local system account, have you enabled the "allow exchange of data between desktop and service" check box for the service (Don't know what it's named in english)? You never know what Flash may need to run.
If that doesn't work out, have you looked at Crowbar and XULRunner? I don't know for sure whether they do what you need - and if they do, whether Flash works with them - but they seem to be approaches to the same thing you are trying to do.

Updated: Interacting with the user on the windows logon screen

#UPDATE:
OK FOR ANYONE ELSE WHO IS SEEKING ADVICE ON THIS ISSUE...
So far, the best thing I have found is to download yourself a copy of pGina and for 2k/XP modify the GINA, and for vista/win7 you will need to create custom login credentials (pGina have the tools/samples to interface with the Vista/Win7 architecture).
to confirm -- it appears that this is what Novell are doing with Vista/Win7 rather than the traditional method of replacing the GINA (like in 2k/XP)
If anyone else comes up with a way to run an application on the logon screen in Win7 please post it.
Ok I'm writing some vb6 software that requires input before the user logs on to the system.
Basically I want to run an application on the Windows logon screen where the user can interact with the program. At present I have the application running as a service allowing to interact with the desktop, but it is still now showing.
I know that "Allow service to interact with desktop" will work in Windows 2000 / XP, I'm running Windows 7 - I am also aware that services cannot directly interact with a user as of Windows Vista - saying this, are there any other methods to get my application running on the logon screen. Novell does it
Does anyone have any other ideas to get this working?
You can only do this if you are authenticating the credentials yourself. Prior to Vista, this was done via GINA, but since Vista, you need to write your own Credential Provider.
The reasons behind this are buried deep in the security principles -- Ctrl-Alt-Del will only ever bring up the window station associated with login (etc), and no other application can get to that window station (so you can't create a fake password box over the top to scrape passwords, for instance).
Without knowing why you think your service needs to interact with that desktop, it's difficult to advise further, but it might mean that your design is broken somehow.
Service isolation will probably prevent you doing this from a service.
Pre-vista Novell and the like would probably have used GINA, which was replaced in vista; http://msdn.microsoft.com/en-gb/magazine/cc163489.aspx
The only way I know of would be to write your own msgina.dll.
It can get dicey during testing though. Any mistakes can mess up your OS so bad that a complete reinstall becomes necessary.

(Windows) How to lock all applications (explorer, task manager etc.) and make only the browser active?

I'm trying to run only the browser in the system - locking access to everything else. Only the supervisor can resume the normal functioning of the system after giving a password.
This kind of activity is usually done by virus. Disabling the registry for Task manager etc. Does anyone know of any source available that does this? I might be able to pull it off in Windows XP. But have anyone tried this in Windows 7 ?
The aim is to to emulate the Chrome OS on Windows. Only the browser. Nothing else.
Sounds like you're after Kiosk Mode. Knowing that, a little searching gives a guide to what to do.
AFAIK, What you are attempting is NOT natively possible on windows.
You best bet would be to write a program that runs in the background and monitors for any processes apart from the browser being launched.
It should immediately terminate the "unauthorised" processes as soon as they are created.
Also using the group-policy manager restrict access to the task-manager to prevent the user from stopping this process.
Contact me if U require help in writing the above program
2.6Kilohertz#gmail.com
GOOD LUCK!!

Need to Unlock Win7 Desktop from C#

I am working on some Automation Project where one needs to perform some action related to display resolution.Change the Display resolution , Lock the Desktop and then Unlock Desktop again to check that resolution remained same.
I am able to perform LockWorkstation but unable to have any thing for Unlock Workstation.
Can any body help me regarding unlocking Display with help of C# and in Win 7 ?
I heard of GINA dll which can help ,but I dont know anything about it.Can this be used for Win7 and .NET 3.5?
Thanks
_Prat.
I don't think that doing this is technically feasible. GINAs were deprecated after XP and the new way to provide custom authentication in Vista/Win7 is to use the ICredentialProvider
interface. Even if you get this working you'll still have to somehow send the the secure attention sequence, i.e. ctrl-alt-delete, to initiate the logon. Sending ctrl-alt-delete programmatically is itself something that is difficult to do and not really supported.
This sounds like a lot of work for some automation and probably won't have much ROI. Can you test this by logging the user off completely and then logging back in? If so, then you could set your test machine to auto-logon the user. When you log-off it will shut down the session and then promptly log the user back in and you could check if the resolution is what you expect.

Resources