Silver's Weblog - Tag - 'Vista'
Windows Calendar and Pre-Patch Tuesday Thursday
I'm sure most people know that Microsoft designates the second Tuesday of each month as "Patch Tuesday" - the standard day for releasing all kinds of updates (both security and non-security) to Windows and other Microsoft products and technologies. Marking this in Windows Calendar is a trivial operation:
However, less well known is that on the Thursday before Patch Tuesday, Microsoft release an "Advance Notification" which indicates how many security patches are planned for release on the following Tuesday, what products they affect, and their severity. But how would you add that to Windows Calendar?
You can't do it via the GUI - it's simply too complex a rule. Wait, how would you describe it in any calendar anyway? Windows Calendar, like the majority of calendaring applications, uses the iCalendar format (RFC 2445). You can't specify that an event is positioned relative to another event, but iCalendar is still very flexible, as it allows you to combine restrictions on a repetition rule (see section 4.3.10 of the RFC for the gory details).
The simplest way I found to get the correct Thursday is to restrict the event using two criteria: month day must be 3 - 9 inclusive and it must be a Thursday. This works because only one day in the range 3 - 9 can be a Thursday each month, and it is five days ahead of the range of possible Patch Tuesday days (8 - 14). The rule is thus: "RRULE:FREQ=MONTHLY;BYMONTHDAY=3,4,5,6,7,8,9;BYDAY=TH".
To add such an event:
-
Start by adding a normal monthly repeating event and give it a unique summary.
-
Close Windows Calendar.
-
Find all the calendars in C:\Users\<username>\AppData\Local\Microsoft\Windows Calendar\Calendars.
-
Open the correct calendar file (they use the name set in the GUI).
-
Find the correct event by searching for the summary of the event.
-
Just above the summary is the "RRULE", which should be replaced with "RRULE:FREQ=MONTHLY;BYMONTHDAY=3,4,5,6,7,8,9;BYDAY=TH".
-
Re-open Windows Calendar, and it should appear on the Thursday before the 2nd Tuesday of every month.
Done! You can even edit anything about the event (except the recurring) from the GUI. Windows Calendar even knows it can't edit the more advanced recurrence rule:
Permalink | Author: Silver | Tags: Vista, Windows, Calendar | Posted: 10:31PM on Wednesday, 27 February, 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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
That's the AppCompat database created. You should now save it somewhere you'll remember (and be able to access from your administrator account).
-
Close Compatibility Administrator, and re-open it as administrator.
-
Open your AppCompat database, right-click it and select "Install".
-
Done!
Now, any time you run Train Simulator, the two fixes will be applied and joy will ensue.
Permalink | Author: Silver | Tags: Compatibility Administrator, Train Simulator, Vista, Windows | Posted: 11:17PM on Tuesday, 29 January, 2008 | Comments: 0
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:
-
Control Panel > Hardware and Sound > Power Options.
-
Change when to turn off the display.
-
Change advanced power settings.
-
Power buttons and lid > Start menu power button > Setting.
-
Select shutdown from the drop-down list.
-
Done.
Permalink | Author: Silver | Tags: Vista, Windows | Posted: 08:04PM on Tuesday, 15 January, 2008 | Comments: 0
Media Center Video Stretching Tip
I find Microsoft Windows Vista Media Center is great in so many ways, but nothing's perfect (more's the pity).
One thing which has been irritating me for a while is how it was using the "shrink-to-fit" method of sizing local video playback instead of "expand-to-fit". This results in any wide-screen videos losing the left and right edges, as I only have a 4:3 monitor (shame on me). I believe it'd be causing equal problems with non-wide-screen videos if I had a wide-screen monitor, though.
Until a few days ago, I'd been using ffdshow's capable suite of options to force output into 4:3 (while preserving the aspect ratio, i.e. adding evil black bars). This really eats CPU, even on the fastest resize mode, increasing usage by approximately 30%, which was actually causing my AMD64 3200+ (2.0GHz) to run out of cycles on some videos.
What I found a few days ago, though, was the real solution: time to start the Registry Editor, folks. Locate the following key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\VideoSettings
Under this key there are a large set of options, most of which you don't want to touch. In this case, however, one particular one is crucial - ZoomMode_Video. Set that to "0". Done.
Footnote: There are 3 other ZoomMode_ options (ATSC, DVD, TV) and all 3 were already set to "0" here. ZoomMode_Video, however, was set to "1". I'd be very interested to hear how many, if any, other people have any of these ZoomMode_ options not set to "0" and which ones.
Permalink | Author: Silver | Tags: Vista, Windows, Media Center | Posted: 09:24AM on Friday, 23 November, 2007 | Comments: 1
Windows Vista Shortcuts for Japanese IME
General Language and Keyboard Shortcuts
|
Shortcut
|
Action
|
|
<Left Alt> + <Shift>
|
Switch input language
|
|
<Control> + <Shift>
|
Switch keyboard layout
|
|
These can be changed from Control Panel, in Regional and Language Options, Keyboard and Languages tab, "Change keyboards...", Advanced Key Settings tab. Alternatively, right-click the Language Bar and select "Settings...".
Japanese IME Shortcuts (summary)
|
Normal Mode (not in the middle of entering a word/phrase)
|
|
<Control> + <Caps Lock>
|
Switch to Hiragana input
|
|
<Alt> + <Caps Lock>
|
Switch to full-width Katakana input
|
|
<Shift> + <Caps Lock>
|
Toggle half-width alphanumeric (English) input and Hiragana input
|
|
<Alt> + <`>
|
|
<Control> + <Shift> + <Caps Lock>
|
Toggle kana and romanji input
|
|
<Shift> + <Space>
|
Enter half-width alphanumeric (English) space
|
|
Conversion Mode (when entering word/phrase via IME)
|
|
<Shift> + <Left>
|
Use less characters for conversion
|
|
<Shift> + <Right>
|
Use more characters for conversion
|
|
<F6>
|
Convert to Hiragana
|
Each of these will flip through a number of possibilities on each press.
|
|
<F7>
|
Convert to Katakana
|
|
<F8>
|
Convert to half-width Katakana
|
|
<F9>
|
Convert to alphanumeric
|
|
<F10>
|
Convert to half-width alphanumeric (English)
|
|
These can be changed from the Japanese IME itself, which can be accessed from the Language Bar (right-click and select "Settings...", then select the IME and click "Properties..."). On the Editing tab, there is a drop-down of key templates and the option to edit. The above keys are all for the default key template ("Microsoft IME").
Permalink | Author: Silver | Tags: Windows, Vista, IME | Posted: 06:39PM on Saturday, 21 July, 2007 | Comments: 0
Powered by the Content Parser System, copyright 2002 - 2007 James G. Ross.
|