Category Archives: Windows

Windows permissions

In an effort to secure my home computers, I have been setting up accounts for my kids on both of them. Very easy. They get to play around with their favourite screensavers and wallpaper settings and so on. And I’m making them regular “users”, not “power users”, so they can’t “accidentally” install anything they find on the Web into the Windows directory or Program Files. (The school computers are riddled with stuff found from some super-dooper smilies and “mini games” web sites).

It’s times like these that you begin to understand why it’s so handy to have the Documents And Settings directories and the Registry, which have areas writable by all users. And you also begin to wonder why some software writers (including Microsoft) ignore them.

Example 1: Midtown Madness 2 (which my son Jeremy loves) needs write access to its own directory, for storing player data and some other guff. Easily fixed, but WHY?

Example 2: the DVD player software that came with one of the computers obviously wants to do something in one of the verboten directories and gracefully crashes and burns when it’s not run as Administrator. Haven’t had time to sort out why, exactly, yet. Must upgrade to PowerDVD — I wonder if it does that.

This is pretty basic stuff. Software authors really should know better.

Quickies

Sick of that stupid “Open With” offering to find you a web service? Me too.

Oh great: MPs will be not only allowed, but funded to send SMS spam.

Most musos say the Net has increased incomes for their work, inspite of P2P sharing and piracy.

More on EA’s exploitation of programmers from the spouse of an EA employee. (via Bleeblog). Jeez. Should we started boycotting EA’s games?!

“A computer once beat me at chess, but it was no match for me at kick boxing.” — Emo Philips.

Winhelp vs HTMLHelp

Popup helpI know the move from the ol’ Winhelp to HTML Help was meant to be a good thing (and at the time made my life easier, as I could re-use HTML formatted text more easily), but the loss of the very handy “What Is?” help originally trumpeted in Win95 is a shame.

Nowadays if you click the question mark on Word 2003’s options screen, for instance, it just chucks you onto a help page which covers the entire dialog. Doesn’t even open the bit that talks about the tab you were on. They really should have ensured that all the functionality of Winhelp 4 (that fine granularity of context-senstivity) was available in HTMLHelp. (Is it? Did the Word 2003 people just get lazy?)

In fact, I reckon what they should have done was improve the help development tools, but leave the underlying technology alone. Winhelp4 worked well for users, but its authoring was a real pain. That’s why tools like RoboHelp won sales. If MS could have come up with a way of easily developing your help in HTML, but having it compile into Winhelp4, they would have been onto a winner. In the days before everyone had IE, it would have got around the issues with poor Win95 users having to install HTMLHelp (and thus, IE 3+), and suffering the performance hit of having to load up the browser just to look at the help.

Of course, at the time MS would have been trying to entrench IE’s hold on every desktop. Which I guess explains why they did it their way.

MSXML HTTP Post: Access Denied error

In MSXML 4 SP2 (and later, I assume in advance) if you try to send Post data using the ServerXMLHTTP40 object to a site that’s in the Internet Zone, you get an Access Denied error.

This is another of those things that had me banging my head in frustration until I eventually solved the problem. Contrary to what you may first think, it’s not a bug.

It’s actually upgraded security in this release: it uses the IE settings, and if you try to send unencrypted Post data by HTTP to Internet zone sites, you run into trouble. Details are at the end of the readme for the SP2 release and in KB 820882, but the workaround given does not work in Windows 2000 because the MMC Snapin referred to is only in Windows XP.

Apparently now there’s a Windows 2000 hotfix you can get, but as with all hotfixes, it involves mucking about ringing up Microsoft PSS to get it. (And when it says “Applies to Microsoft Windows 2000 Standard Edition”… what is that, exactly? Maybe they mean Professional?)

You can also get into IE and change the zone settings, but it has to be the same user that runs your process. If the process is some kind of robot, it’s not always possible to do this.

Eventually I dug around in some MSKB articles and eventually found article 182569 that talked about how to change the relevant settings via the registry.

To tell Windows to ignore user-specific settings, and always use the zone setting you are about to define, create or edit the following Registry key:

HKEY_LOCAL_MACHINE; Software; Policies; Microsoft; Windows; CurrentVersion; Internet Settings; Security_HKLM_only (DWord value) = 1

The alternative would be to change the following setting for each user that will try and do the HTTP post, eg in HKCU/HKU instead of HKLM.

Okay, so to tell it to allow unencrypted HTTP Post data into the Internet zone:

HKEY_LOCAL_MACHINE; Software; Microsoft; Windows; CurrentVersion; Internet Settings; Zones; 3; 1601 (DWord value) = 0

See MSKB 182569 for more details.

Windows XP search

Windows XP Search isn’t quite as good as it first appears to be. Oh sure, it’ll find stuff in files… sometimes. After almost banging my head on the table wondering why it couldn’t find some file content I knew to be there, I initially wrote it off, guessing that it had problems with the Unix-style LFs I’d given it.

But no… a little more fiddling and I discovered that it ignores file types that aren’t registered in Windows. It doesn’t seem to say this on the search options anywhere, but I proved it by creating two identical files, one called textfile.txt and the other called textfile.randomextension. Searching for content I knew to be in both, it consistently would only find textfile.txt

Is this sensible? Is this right? Well okay, I can understand that you’d write a search tool that didn’t want to search particular types of files, for speed purposes. But why stop the user switching it to search everything? And why hide this fact so well? I can find no mention of it in the help or on the screens. Sure, you can search with an animated screen character (Clippy lives… almost), but how about looking in all files, and I mean ALL files?

Windows XP search results

Eventually I found a KB article that shows how to dodge around it:

309173: Using the “A word or phrase in the file” search criterion may not work. This lets you switch on searching for specified extensions, or to tell the Index Service to index absolutely everything, which I assume would burn up lots of disk space. There seems to be no way of searching everything on-the-fly without using Index Service.

Registering your weirdo extension as a text file doesn’t work. Renaming your file does. If there’s lots of them, you can always go to DOS and: ren *.randomextension *.txt then back again when you’re finished. (Windows XP Command Line Reference.)

And of course, there’s always DOS’s FIND "phrase" *.* >resultsfile.txt

Service packs

Here’s Microsoft on why service packs are better than patches (as well as explaining their meanings for: Product family, Product, Version, Service pack, Patch).

They don’t really clarify Service Pack vs Service Release, claiming it’s the same thing, though at one stage it seemed that an SP is cumulative, whereas SRs often require you to install them consecutively to be up-to-date, eg Office 97 SR1, then SR2b.

This theory is broken with Visio 2000 SP2, which requires SR1 before you install it. Helpfully, SP2 is available for download, but SR1 isn’t! Brilliant! I have a vague feeling that vanilla Visio 2000 was never available for retail sale, but it’s certainly found its way into a few enterprises (such as where I work), so some people are bound to need SR1. But no. Obviously it was taking up too much valuable disk space on the Microsoft servers.

Unix to Windows FTP year issue

While wrestling with automated FTP jobs at work, thanks to a colleague I’ve discovered a cute little buglet when Windows talks to FTP servers using the Unix standards (which includes IIS by default). Actually it’s not so much a bug, it’s more of an issue of a supposedly user-friendly way of showing file dates still being used even when the “user” is another machine.

It goes like this… let’s say the Unix FTP server is 1 minute faster than the Windows client one, and the file is brand spanking new, just placed there. It’s 10am, and your Windows client goes looking for a file.

Windows says “What time was this file dropped?” Unix, being the kind of laid-back casual user-friendly operating system that it is, abbreviates its answer to exclude the year, and replies “Nov 4 10:01”.

Windows sees this, and the logic says “Right now it’s only 10:00am. This file can’t be from the future. I’ll assume it’s from last year.”

Evidently this can happen if the Unix server is a second or many minutes ahead. It may be further complicated if they’re running on different timezones, GMT vs AEST etc.

The solution is probably down to your individual circumstances. For us, we know we’d never be getting files that are a year old, so we can easily code around it. Ultimately though, surely something should be changed so that the client can get the full picture, not an abbreviated form of the file date/time.

XP SP2

I don’t run Windows XP (my PCs are a couple of years old and happy on Win2K… I don’t feel compelled to lumber them with the beautiful XP), but a lot of people I know do. I want to give one of them a copy of SP2 to install, to save a long boring troublesome download via dialup.

Problem? The SP2 download page lets you install it via Automatic Updates or Windows Update. Or you can order a CD. You can order it in any country, not just North America (good) but it takes four to six weeks to arrive (bad). If the average unpatched computer can be compromised in 20 minutes, in four weeks it could be compromised 2,016 times. (Okay okay it’s on dialup, so it wouldn’t be connected all that time.) Gimboids. Even the Download.com page for it pointed me back to Microsoft.

Happily, I did find it on an APC Magazine CD. I also eventually found the Butch Microsoft Technet Geeky Professional Developers’ download page.

File not found

Back when IE4 came out, Microsoft trumpeted the integration of the Web and the desktop. Active Desktop, remember that? One of the other things they did was to make Windows Explorer look a bit more like the Web, and make Internet Explorer capable of doing Windows Explorer-type things.

I was doubtful that it was very helpful, but in any case they went too far. We now have the ridiculous situation of Windows Explorer showing the following message if you try to go manually (eg by typing) to a path that doesn’t exist.

Windows path not found error

The path doesn’t exist. Adjusting my browser settings is not going to help.

Refreshing or trying again later is not going to help.

Checking my Internet connection settings is not going to help, nor is getting Windows to do its magical check of my connection settings.

Checking if I have 128-bit security it’s definitely not going to help, for F’s sake.

Click the Back button? Try another link? I wasn’t clicking on a link!

And it says it can’t find a server, or had a DNS error. Bullshit. WhatTF use is that?

(This was in Windows 2000/IE6. Have they fixed this in Windows XP?)