Properties settings works on XP, but not Vista. What gives?

  • Thread starter Thread starter Thomas Thomassen
  • Start date Start date
T

Thomas Thomassen

Hi
I made a screensaver in C# as a test project. At the time of creation I used
XP and everything worked fine.
Then I got a message from someone using Vista about an issue where the
settings doesn't seem to stick. I tested on my own Vista box and I got the
same result.

The issue is that, while you can set custom colour and font in the settings
window and the settings will be saved and be reflected correctly when you
preview the screensaver, it will use default settings when the screensaver
is triggered by Windows. I've gone thorugh the code again and again, but I
can't seem to find any reason for it to do so.

I'm wondering if Vista has changed the way screensavers run?

Or has anyone else expereienced problems when using property settings like
"Properties.Settings.Default." ?

The screensaver in question can be found at Wincustomize.
http://www.wincustomize.com/skins.aspx?skinid=178&libid=40

-Thom
 
[...]
The issue is that, while you can set custom colour and font in the
settings window and the settings will be saved and be reflected
correctly when you preview the screensaver, it will use default settings
when the screensaver is triggered by Windows. I've gone thorugh the code
again and again, but I can't seem to find any reason for it to do so.

I'm wondering if Vista has changed the way screensavers run?

Maybe. I read something on sysinternals that said that Vista has changed
where the login UI runs (that is, what session it runs in). It may be
that that change extends to the screensaver, and/or that something about
how the screensaver is configured is affecting what session it runs under
(for example, having it set to lock the desktop when the screensaver runs).

How to fix this, I have no idea. But as a start, you might look to see if
the settings that the screensaver uses are stored in some other user (like
under the "All Users" directory, or some other one under "Documents and
Settings"). For example, look for folders by the same name as your
screensaver in the "Documents and Settings" directory, especially ones you
find in users you didn't expect to find.

Once you find a .config file that seems likely, you can test whether
that's the one being used by editing it by hand to change some setting,
and see if the screensaver does indeed use that .config file instead of
the user's.

It would not surprise me at all to find that under Vista, the screensaver
runs under session 0, rather than any logged-in user's session and as a
result doesn't use settings that the user sets from their own session.
Actually, I lied when I said "I have no idea" how to fix it. At least one
way would be just to store the screensaver settings somewhere else. But
that would mean coming up with your own settings storage scheme, and it
would also mean that all users would use the same settings. Hopefully
there's a better way, that allows each user to configure their own
screensaver settings. What that way is, I don't know though. Sorry.

Pete
 
I did some checking.
The screensaver runs in session 1 when it's in preview and when it's being
triggered by windows.

Another thing I noticed is that it seem to use separate settings for the
different modes. When it's being run as a screensaver you can press any
number button to set the opacity value of the window. This is saved and
remembered the next time the screensaver starts. But using the settings
dialog and preview function still operates with completely separate
settings. Any file I could find which I thought would be the screensaver
setting file gave me an Access Denied when I tried it read it. Because Vista
got completely new folder structure I'm not sure if the files I found was
really the settings files.
I'm sortof in a loss to where to start to look for a remedy.
But I think I might just make it use a ini file instead.


Peter Duniho said:
[...]
The issue is that, while you can set custom colour and font in the
settings window and the settings will be saved and be reflected
correctly when you preview the screensaver, it will use default settings
when the screensaver is triggered by Windows. I've gone thorugh the code
again and again, but I can't seem to find any reason for it to do so.

I'm wondering if Vista has changed the way screensavers run?

Maybe. I read something on sysinternals that said that Vista has changed
where the login UI runs (that is, what session it runs in). It may be
that that change extends to the screensaver, and/or that something about
how the screensaver is configured is affecting what session it runs under
(for example, having it set to lock the desktop when the screensaver
runs).

How to fix this, I have no idea. But as a start, you might look to see if
the settings that the screensaver uses are stored in some other user (like
under the "All Users" directory, or some other one under "Documents and
Settings"). For example, look for folders by the same name as your
screensaver in the "Documents and Settings" directory, especially ones you
find in users you didn't expect to find.

Once you find a .config file that seems likely, you can test whether
that's the one being used by editing it by hand to change some setting,
and see if the screensaver does indeed use that .config file instead of
the user's.

It would not surprise me at all to find that under Vista, the screensaver
runs under session 0, rather than any logged-in user's session and as a
result doesn't use settings that the user sets from their own session.
Actually, I lied when I said "I have no idea" how to fix it. At least one
way would be just to store the screensaver settings somewhere else. But
that would mean coming up with your own settings storage scheme, and it
would also mean that all users would use the same settings. Hopefully
there's a better way, that allows each user to configure their own
screensaver settings. What that way is, I don't know though. Sorry.

Pete
 

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