Silver's Simple Site - Weblog - 2008 - January


Windows Vista Start Menu "Bye" Options

Although I don't really like Joel on Software, in this case he has the most appropriate rant to give the context for this post.

"Every time you want to leave your computer, you have to choose between nine, count them, nine options: two icons and seven menu items."

Ignoring the fact that I only have six menu items (no Hibernate), he has entirely missed the fact you only need the two buttons in all normal circumstances.

Sleep (left button)

By default, the left button is sleep, and it is the new hybrid sleep added in Vista. This does a combination of hibernate and suspend from previous versions - saving your work to disk, but only putting the computer into a low power state. This lets you resume work really fast and protects from power-loss.

Lock (right button)

The right button locks the computer. But wait, it also gives you access to switch user - using that giant blue button labeled "Switch User" on the locked screen. You can even shut down (or restart, or sleep - again) from the Switch User screen.

Redundant Options?

In his rant, Joel suggests that you don't need these at all:

  • Switch User
  • Log Off
  • Restart

While they are not usually useful, it's still useful sometimes to log off or manually restart, and switch user is a shortcut to lock+switch user which you might not remember or know.

Shutdown

In fact, there is only one option you might regularly need: shutdown. If you need this often, you're unlikely to need sleep, so the obvious thing to do is replace the sleep button with a shutdown one:

  1. Control Panel > Hardware and Sound > Power Options.
  2. Change when to turn off the display.
  3. Change advanced power settings.
  4. Power buttons and lid > Start menu power button > Setting.
  5. Select shutdown from the drop-down list.
  6. Done.

Permalink | Author: | Tags: Vista, Windows | Posted: 08:04PM on Tuesday, 15 January, 2008 | Comments: 0


ChatZilla Static Release Console

Some people know about the ChatZilla Release Console, a slightly unstable and very dynamic page which displays the bugs planned for the next ChatZilla release or two (as well as an archive of bugs fixed in older versions). It's been around a while, and works in IE 7 and Firefox 2, but it is pretty heavy on the dynamics, and some people have had it completely hang Firefox on occasion.

To address this, I have created the ChatZilla Static Release Console, which is entirely static HTML (and CSS), created by Perl on my server rather than JavaScript on the client. It doesn't even have a META refresh. You can also get it to view a specific release.

Permalink | Author: | Tags: ChatZilla, Perl | Posted: 04:27PM on Sunday, 20 January, 2008 | Comments: 0


Compatibility Administrator Meets Train Simulator

The original Microsoft Train Simulator was a great game at the time, and continues to be good fun (I'll save why it's better than Kuju's newer Rail Simulator for another time). It does, however, not entirely work by default on Windows Vista. There are a couple of issues:

  • Resolution changes cause windows to be rearranged.
  • On exit, it tries to create C:\FileIn.cns and C:\FileOut.cns and gets stuck in a loop because it can't.

You could work around the latter problem by running it as administrator, but that's clearly a substandard "fix". However, a much better solution which can solve both issues is the Compatibility Administrator in the Microsoft Application Compatibility Toolkit.

The Compatibility Administrator lets you tap in to a powerful collection of fixes already written by Microsoft for making other applications compatible with new versions of Windows. It also lets you view the fixes applied to each and every application in its system AppCompat database.

After installing the Application Compatibility Toolkit, you can launch the Compatibility Administrator as a standard user. For the purposes of this post, I'll create an AppCompat database just for fixing Train Simulator, but you can fix any number of programs with a single database, which simplifies deployment and installation.

  1. Since it starts with a new database by default, just rename it by right-clicking and select "Rename". It really doesn't matter what you call it; I called mine "James Ross" in case I ever fix anything else with it.
  2. Select the database, select the "Database" menu, "Create New", "Application fix...". This opens the wizard which will configure all the fixes we want for a single application.
  3. Enter the details on the first page:
    • Name of the program to be fixed: "Train Simulator" (it's only for display).
    • Name of the vendor for this program: "Microsoft" (also only for display).
    • Program file location: browse to "train.exe" (e.g. "C:\Program Files\Microsoft Games\Train Simulator\train.exe"). This will be used later.

  4. Now we get to pick from some standard fixes, including the commonly-used version lies. We don't want to select anything here, so ensure "None" is selected for the "Operating System Modes" and move on.

  5. This is where the fun happens! There is a long list of possible fixes here, many of which can also take a command-line with options to control or limit the code that applies the individual fix. For the relatively simple problems with Train Simulator, we want to use two fixes:
    • CorrectFilePaths

      With this, we can redirect CreateFile API calls (among other file APIs) to actually access somewhere other than where the program passes. We use the following command-line:

      -b "C:\FileIn.cns;%UserAppData%\FileIn.cns" "C:\FileOut.cns;%UserAppData%\FileOut.cns"

      The -b (bare) turns off the standard mapping (which covers some system files that have moved over Windows versions), and then we specify two file corrections. Important to note that the double-quotes go outside the semi-colon separated pair of file paths. Also, we make use of one of the replacements (%UserAppData%), but note that these are not environment variables. There is a good weblog post about using CorrectFilePaths as well as some TechNet documentation.

    • ForceTemporaryModeChange

      This one is much simpler, and probably obvious from its name! It simply ensures that any resolution change is flagged as temporary, which prevents the window manager from shuffling things around.

    As you may have noticed, the wizard has "Test Run..." buttons on each page of options. You need to be an administrator to use them (as it installs an AppCompat database temporarily to do it), but they can be very handy in some cases.

  6. Now we must tell Windows how it is supposed to identify that this set of fixes should be applied to a launching application. The wizard will automatically add the executable selected at the start, and tick some properties. In our case, there's no need for most of them and I unselected everything except PRODUCT_NAME.

    You could, if needed, add references to other files and decide which properties from them matter too; the fixes will still only be for the original executable, but it provides finer control over when to apply the fixes.

  7. That's the AppCompat database created. You should now save it somewhere you'll remember (and be able to access from your administrator account).
  8. Close Compatibility Administrator, and re-open it as administrator.
  9. Open your AppCompat database, right-click it and select "Install".
  10. Done!

Now, any time you run Train Simulator, the two fixes will be applied and joy will ensue.

Permalink | Author: | Tags: Compatibility Administrator, Train Simulator, Vista, Windows | Posted: 11:17PM on Tuesday, 29 January, 2008 | Comments: 0

Powered by the Content Parser System, copyright 2002 - 2024 James G. Ross.