MainWindowTitle empty in Vista

  • Thread starter Thread starter JamesB
  • Start date Start date
J

JamesB

Hi
Apologies for the crosspost...

I've written a windows service (c# 2.0) that is used in my workplace to
monitor application usage of our users. It basically gets a list of
processes and associated window titles (if present) and logs these for
management to refer to.

Unfortunately it doesn't work on Vista! Well, it does, in that the .exe
names are logged, but WindowTitles are not. Doing a debug, these are always
an empty string in Vista.

I did some googling and found references to the "allow service to interact
with desktop" tick to not actually "work" in Vista, even though it's there.

Is there some group policy setting I can make to allow my service to work as
intended? Or some sort of code change that *would* pull out the window
titles? It works a treat on XP and 2000!

James.
 
This is part of the service hardening that was done in Vista to enable
security. It is a very bad (or worse) idea to have a high-privileged service
interacting with the interactive user.

To solve this you need to factor the service into two pieces, or rethink the
concept entirely. One piece would run on the interactive desktop and do the
data collection. The other piece runs as a service and performs any tasks
that require highly privileged access. If you do it right you may find that
you don't need anything that requires highly privileged access.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top