RE: Blocking Screensaver from Appearing
- From: "Mike S." <MikeS@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 3 Aug 2005 13:05:04 -0700
Good to hear! Glad to be able to help.
"Paul Smith" wrote:
> Mike,
>
> The registry approach works like a charm. Thanks again.
>
>
> "Mike S." wrote:
>
> > Paul,
> > I went through the same exercise a while back. Unfortunately,
> > programmatically moving the mouse won't do it. If you use a Group Policy to
> > set the screensaver I can tell you it's a semi-futile effort to try to
> > override that to any extent. My spec was to set the timeout, active flag,
> > start time, end time, etc.
> >
> > I ended up writing a .net service that checks a registry setting on a
> > periodic basis. If the setting was 1 the set it to 0. The registry key is
> > HKEY_Users\Software\Policies\Microsoft\Windows\Control
> > Panel\Desktop\ScreenSaveActive. Also note that if you are using a service
> > under the local system context, you'll need to iterate through all the logged
> > on users in the HKEY_USERS hive and set the \ScreenSaveActive bit
> > appropriately.
> >
> > If you're not using group policy for the screen saver there are api calls
> > you can make that are fairly simple.
> >
> > -Mike
> >
> > "Paul Smith" wrote:
> >
> > > I have been given an unusual task to create a Windows Service to do something
> > > periodically to make the screensaver timer reset. We have a general policy
> > > of locking computers automatically after 10 minutes of inactivity. This
> > > windows service would be used on some machines to prevent the lock from
> > > occurring every 10 minutes.
> > >
> > > I have tried to reposition the mouse pointer with the Cursor class in a
> > > service, but it does not work -- always sees the cursor at 0,0 and does not
> > > recognize a new position being set for it. I have also looked for something
> > > to directly reset the timer the screensaver uses, but have found nothing.
> > >
> > > If someone could suggest a straightforward way to capture the real mouse
> > > coordinates from a .NET Windows Service, so I can nudge the mouse to prevent
> > > the screensaver from appearing, or to directly reset the screensaver timer,
> > > that would be most helpful. We can not just set Windows properties (like
> > > screensaver to none), as we do not want users to be able to prevent the
> > > screensaver from appearing.
.
- References:
- Blocking Screensaver from Appearing
- From: Paul Smith
- RE: Blocking Screensaver from Appearing
- From: Mike S.
- RE: Blocking Screensaver from Appearing
- From: Paul Smith
- Blocking Screensaver from Appearing
- Prev by Date: RE: Blocking Screensaver from Appearing
- Next by Date: Re: ldap connection problem
- Previous by thread: RE: Blocking Screensaver from Appearing
- Next by thread: newbie: Which version of VB.net
- Index(es):
Relevant Pages
|