Sunday, November 14, 2010

Windows 7 - An Exercise in Futility (Or: More Questions Than Answers)

Wrestling with Windows 7 is sometimes as futile as bungee jumping without a cord. Nowhere is this more apparent than dealing with the logon default screen. The two primary elements involved are the default logon wallpaper (well, excuuse me: background) and the default logon screensaver. Let's consider each one in turn:

1. Default Logon Background/Wallpaper

A quick Google search will reveal any number of sources that describe the following method to change the default logon background manually:
  • Open the registry editor (regedit.exe)
  • Go to key HKEY-LOCAL-MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background
  • Select the value OEMBackground and change the value data to 1
  • Close the registry editor and open Windows Explorer
  • If it does not already exist, create a new folder C:\WINDOWS\system32\oobe\info\backgrounds
  • Copy the desired JPG image file to the folder, then rename it to "backgroundDefault.jpg"
You can also provide additional resolution-specific background images for all screen resolutions honored by your computer. Name those files following the pattern "background[width]x[height]" in pixels: for example, "background800x600.jpg" or "background1280x720.jpg". In addition, all such image files must apparently be less than 245/250/256Kb in size. In the absence of the appropriate resolution-specific image file, the image "backgroundDefault.jpg" will be used and resized to the default screen resolution.

My new Toshiba laptop allows the following screen resolutions:

Toshiba Laptop Screen Resolutions
Resolution
(in pixels)
Ratio
(width to height)
1680 x 945 1.777
1600 x 900 1.777
1360 x 768 1.7708333
1280 x 800 1.600
1280 x 768 1.666
1280 x 720 1.777
1152 x 864 1.333
1024 x 768 1.333
  800 x 600 1.333

It is a well-established fact that Windows 7 does not allow different users to retain different screen resolutions. If I log on and set my resolution to 1280x720, the next user who logs on after me will initially inherit that same resolution. If that second miscreant changes the resolution to 1680x945 for his or her session, then I in turn will encounter that new resolution when I log on afterward (much to the dismay of my 20-400 vision). The primary users of my new Toshiba—my two children and myself—all use the 1280x720 resolution. However, after any one of us logs off, Windows 7 unexpectedly reverts instead to the image I designated for 1360x768 (i.e., file "background1360x768.jpg") as the default background for the logon screen.

Clearly, a different default resolution is at work. That raises the obvious question: how does an administrator change the default resolution of the logon screen? I spent the better part of two hours per day for three straight days Googling this question with absolutely no meaningful results. Surely someone knows the definitive answer, but I have yet to encounter that person. If anyone reading this entry can shed any light on the subject, by all means add a comment to this blog. I will be forever grateful—with all the rights and privileges that entails.

2. Default Logon Screensaver

In Windows XP, adding the following three string values under registry key [HKEY_USERS\.DEFAULT\Control Panel\Desktop] causes the indicated screensaver to activate when no users are actively logged on:

[HKEY_USERS\.DEFAULT\Control Panel\Desktop]
  • "ScreenSaveActive"="1"
  • "ScreenSaveTimeOut"="600"
  • "SCRNSAVE.EXE"="C:\zBob\scrnsavr\JPEGsaver\JPEGsaver.scr"
    ...or...
    "SCRNSAVE.EXE"="C:\zBob\scrnsavr\picSaver\picSaver.scr"
I have two favorite screensaver programs: JpegSaver and PicSaver. Both work properly as the default screensaver in Windows XP, but the same registry entries fail miserably as the default screensaver in Windows 7. This despite the fact that both screensavers work correctly for individual users after they log on even as a standard user with no special administrative privileges.

The error message with PicSaver (to the effect that it could not find any image files) led me to suspect that for some reason the configuration file was not being read properly. PicSaver stores user configuration information in an external file "C:\Windows\PicSaver.ini" while JpegSaver stores its configuration data in file "C:\Users\[user name]\AppData\Local\jpegsaver.cfg" where the user's name appears in place of [user name].

Because I created the files when logged on as administrator, I suspected a possible permissions problem. My hypothesis postulated that the default screensaver might operate with the limited privileges of the standard user and would therefore conflict with the admin only privileges inherited by the configuration files I created as administrator. Consequently, I attempted to revise the permissions of the configuration files with the intention of allowing all users full read and execute (but not write) privileges.

I first tried to edit the PicSaver.ini file using my trusty 32-bit file manager, 2xExplorer. I was able to edit the file contents just fine, but I could not change the user privileges. When I switched to the 64-bit Windows Explorer, much to my astonishment, I could not even see the PicSaver.ini file that I just edited in my 32-bit file manager!

I then turned my attention to the JpegSaver configuration files. I could see and edit those files with 64-bit Windows Explorer as well as 16-bit 2xExplorer, and I could even change the permissions using Windows Explorer. Unfortunately, adding users and then giving users read and execute privileges still did not succeed in displaying JpegSaver wallpaper images. In fact, I saw only a black screen without so much as an error message.

In light of these failures, I tried a different approach. An absolutely fantastic image viewer/editor called IrfanView allows users to create image slideshows and save them as a self-contained executable (file type .exe) or screensaver (file type .scr) file. By self-contained, I mean no dependencies on any external image files whatsoever: the images are embedded within IrfanView's output file. Employing this feature, I created my slide show and saved it as both file formats (.exe and .scr) as test cases. When I entered the names of my slide show files into the registry key SCRNSAVE.EXE discussed above, lo and behold: both files worked perfectly!

I was happy to have at least circumvented the problem even if I did not truly solve it. However, there are at least two mild drawbacks to this technique:
  • To stop the slide show, users must click the escape key instead of wiggling the mouse as with a true screen saver
  • More importantly, every time I find a new image that I want to add, I must recreate the entire slide show all over again. This process is a stark contrast to the standard screensaver, where the simple act of adding new files to any folder earmarked in the screensaver configuration automatically displays the new images as a matter of course.

Summary

At least three questions remain unanswered:
  1. Why do the two screensaver programs with external configuration files not work as default screensavers in Windows 7, especially when the very same registry entries work so well in Windows XP? Does the problem lie with those external configuration files, or is the real problem something else altogether?
  2. Why does the all-powerful and all-knowing 64-bit Windows Explorer not even display the one configuration file "C:\Windows\PicSaver.ini" when 32-bit file managers can? Both of my 32-bit file managers, 2xExplorer and FreeCommander, not only display the file in question but also allow me to edit the file contents even if I cannot edit the file permissions.
  3. How does an administrator control the screen resolution of the default logon screen?
This situation is again reminiscent of the standing joke about economists: if you were to gather ten economists in a room to study a problem, you are sure to obtain at least eleven opinions. In this case, I began with just two problems yet wound up with three unanswered questions.

Just further evidence that computers are like air conditioners: they both stop working properly whenever you open windows.

No comments:

Post a Comment