Results 1 to 4 of 4

Thread: Problem capturing screenshots as a windows service??

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2009
    Posts
    2

    Question Problem capturing screenshots as a windows service??

    Hi,

    Basically I have created a windows service using VB 2008 where I am trying to capture screenshots periodically.

    The timer is working fine and I have tested this.

    The purpose of the service is to monitor the desktop over night when the user is logged off, by capturing screenshots and saving them to file. This is so admin can be alarmed about security breaches etc.

    The problem is is that I have not found a way to capture desktop screenshots as a windows service (or otherwise) while the windows logon screen is active (i.e: when the user locks the computer). I have used google extensively but to no avail!

    Any help would me much appreciated!!

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Problem capturing screenshots as a windows service??

    Well first off, if you just want to see if someone has logged in to a PC overnight then an easier way would be to configure security auditing on the PC (and on your domain controllers if you think it is only a domain account that could be logged on to) so that it logs an entry in the windows security event log whenever a user logs in (or tries to login and fails).

    Anyway, if you still want to make this service then perhaps you can list what you have tried so far? Have you tried using any of the Windows APIs that capture screen images?

    It also depends what exactly you want to take screenshots of, if its just the Ctrl Alt Delete screen and the login screen then you might be able to do it but if you want to continue to take screenshots once a user has logged in then I think you are going to find it hard. Services run in a different desktop to the interactive desktop that users see when they login and as such they have no way of seeing what is on the users desktop etc. However you can mark a service as INTERACTIVE which permits it to interact with the users desktop but this is not really a great idea... but for something like this that simply needs to collect data from the users session rather than let the user interact with the service then I guess its not so bad.
    See this MSDN article for more info on interactive services: http://msdn.microsoft.com/en-us/libr...02(VS.85).aspx
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2009
    Posts
    2

    Re: Problem capturing screenshots as a windows service??

    Firstly your first suggestion wont work for this paticular case as we need screenshots.

    I understand that there are 3 desktops; user desktop, screensaver and winlogin. I need the program to keep running while the logon screen is active and take screenshots of the user desktop (even though on the physical computer screen it shows the logon screen.

    Isnt there a away you could hook onto the user desktop process and grab screenshots while the logon screen is active?

    Also, I have allowed user interaction with the service but have no idea about how to take a screen shot the way I want to.

  4. #4
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Problem capturing screenshots as a windows service??

    I need the program to keep running while the logon screen is active and take screenshots of the user desktop (even though on the physical computer screen it shows the logon screen.
    So are you talking about a Remote Desktop connection then? If not then I dont understand... how can you take screenshots of a users desktop on a PC if they are not even logged in :S
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width