HP G85 All in one Printer under Vista, and Word 2007 Slowness

0
Filed under Uncategorized

I picked up an HP G85 ages ago, and it’s been a bulletproof printer ever since. Print quality is still excellent, scanning is top notch, and it has very good fax support. There’s newer stuff out there, but damn, I spent close to 800$ on this thing when it was new, so I’m a bit attached to it.

I hooked it up to a JetDirect 170x to turn it into a networked printer, which works great because it’s a bit large to put in the server closet with all my other equipment, and faxing would be a pain.

So I was more than a little bummed to discover that although Vista ships with HP G85 drivers, it DOESN’T have any support for the JetDirect box. I tried all sorts of things to get it to work, even creating my own Port definition. No joy.

I eventually installed the drivers to my server and then shared the printer there. At that point, I could create a new printer on my workstation and just point it to the shared server printer. That worked and I thought I was home free.

However, I started noticing some very peculiar behavior in Word 2007. I’d start it, and after a few seconds, it would display “Connecting to Printer” in the lower left corner of the status bar.

Often, though, Word would just hang for a minute or more as it loaded the document.

What’s worse, invoking Word through it’s COM Objects and loading a document would also take forever.

Bad news.

I suspect it’s not necessarily a problem with Word 2007, though it could be. I recently stumbled across this post by Mark Russinovish (one of the SysInternals guys) that details some spelunking he did to determine why File Open dialogs could end up being so slow under Vista. Turns out, Vista tries, maybe a little too hard, to be all user cuddly/cozy. We have ultra-mega-giga hertz machines and can’t display a freakin’ file open dialog any faster that DOS 6.2 programs running under Netware back in the late 80’s.

Anyway, I deleted the printer definition pointing to my shared server printer and all was back to normal.

But I couldn’t print.

Then, I stumbled onto the HP Install Network Printer Wizard on the HP site. I can’t tell how fresh it is, but it’s gotta be pretty recent because I went looking for just this sort of thing not a month or two ago.

Anyway, it works a treat, except that I can only PRINT to the G85 this way (the scanning and faxing support isn’t there, and they even warn that it’s not).

So, we’re back and printing, and it doesn’t hang Word up anymore.

I’ll just call the IT guy in to take care of the scanning…. Oh, right. I telecommute<sigh>.

Captchas Back On

1
Filed under Uncategorized

Sigh. Too many spam comments are coming in, so I had to turn Captchas back on.

For those that don’t know, Captcha’s are the little “enter the funky characters from the picture” at the bottom of the comment screen when you want to leave a comment. It’s basically just a way to keep spam bots from being able to automatically post comments to messages.

Unfortunately, I’m getting too many scum-sucking, dregs-of-the-earth types posting BS comment spam to leave comments open anymore.

Where’s a handy pool full of hungry piranha when you need them?

Network Autotuning and Vista

2
Filed under Troubleshooting, Utilities

I’ve noticed over that past few weeks of running Vista that certain things tend to be A LOT slower now, even given the fact that I recently picked up a gigabit network card for my server, and a gigabit switch, so I could make use of the built-in gigabit network adapter on my new workstation motherboard.

For instance, I use a program called VBLiner to line number all my VB source right before I compile it. The line numbering process itself is very fast, but the program would pause, noticeably, for each file it opened. It was almost as if the process of locating and opening the file was slow, but actually reading it was very fast.

Today, it finally got to be too much, so I had to start digging.

Come to find out, Vista has this nifty new thing called “Network Autotuning” that, apparently, doesn’t work particularly well.

You can see it yourself by opening a DOS box (with Admin priviledges), and entering

NETSH INTERFACE TCP SHOW GLOBAL

You should end up seeing something like this:

image

That “normal” is the problem.

Execute this to turn off autotuning:

NETSH INTERFACE TCP SET GLOBAL AUTOTUNINGLEVEL=disabled

turn it back on with

NETSH INTERFACE TCP SET GLOBAL AUTOTUNINGLEVEL=normal

and, apparently, using this will sometimes work, too, though I’m a bit hesitant to bother at this point.

NETSH INTERFACE TCP SET GLOBAL AUTOTUNINGLEVEL=HIGH

Nothing like a built-in network performance de-tuner.  It’s STRESS.EXE but without all the hassles of actually having to run a utility. Grrr.

Titans of Grammar

1
Filed under Uncategorized

I’ve been known to make a few spelling mistakes in code (retrieve vs retreive caused me no end of pain at one point, long, long ago), and any programmer knows that it can sometimes be tricky to get the grammar right for a particular dialog, especially when a checked checkbox causes something to not happen<g>. I usually set up a special priority (1000 in a 1-10 system) for spelling and grammar mistake bugs in whatever bug tracking system I’m using, because, let’s face, it, few bugs are more embarrassing, both for the programmer and the company, and fewer still can be located and fixed as easily.

But this one surprised me. It’s in the IIS7 management console.

Bad Grammar

Ah, good to see that even billions of dollars in liquid capital can’t solve this problem.

Digital Signatures in Word 2007 Templates

1
Filed under Office

Encryption is an unbelievably complicated topic and I’m only now beginning to get comfortable with digital signatures in Office documents.

The Good News is that in Office 2007, other than the fact that the menu locations for checking signatures has changed, most everything about digital signatures has remained the same as in Office 2003, and, from what I can tell, things are compatible all the way back to Office 2000.

The Bad News is that it’s still complicated as hell to deal with digital signatures.

I’ll try to cover a few of the bigger bits I’ve come up against while digging through digital signatures in Office (and in particular, in Word).

Signing a DOT file

The first thing you must do when getting ready to sign a template is to manually enable timestamping. Ok, technically, you don’t have to do this, but if you don’t timestamp the signature, when the certificate used to sign the template expires, so will the signature, and poof, your template will no longer be signed. Depending on how the user’s Word Is configured, that may mean that your template now fails to load.

You enable timestamping by adding a few entries to the registry. Office doesn’t provide a way to do this via the UI (even in 2007), so it’s all regedit (or run the REG script below).

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\VBA\Security]
“TimeStampURL”=”http://timestamp.verisign.com/scripts/timstamp.dll
“TimeStampRetryCount”=dword:00000005
“TimeStampRetryDelay”=dword:00000005

Once you’ve turned timestamping on, you need to verify that you have a digital certificate loaded that can be used to sign templates.

Click the Start button and RUN, enter MMC and press Enter. This should bring up an empty Management Console.

image

Click FILE, Add/Remove Snap-in and find the Certificates snap in, then load it up.

When it asks for what type of certificates to manage, select the computer account.

image

Next, it should ask about managing the local computer account or a remote computer account. You’ll normally want to only deal with the Local Computer.

Once you get the certificate manager loaded, expand the personal certificates. Generally speaking, this is where certificates purchased through online vendors (like Verisign) will end up when you download them.

image

Now, right click the certificate and choose Properties.

image

You should see code signing in the box as shown. I’m not an expert on the different types of certificates, so it may be possible to sign documents WITHOUT a code signing certificate. Best to talk with someone at your vendor for details on that. One definite benefit of a code signing cert is that you can use it to sign DLLs, and EXEs, as well as templates.

Anyway, at this point, you can be pretty sure the cert is appropriate for signing templates.

One final note: It is often a good idea to export the signature so you can use it via the command line etc. The PFX (Personal Information Exchange) file format is good for this, because it contains both the public and private keys for the certificate. The bad news is you want to protect the PFX file as much as possible, because if someone obtains it and the password used to create it, they would be able to sign documents as if they were you.

You can export to a PFX file by right clicking the certificate entry (in the middle list), selecting All Tasks, then Export.
Indicate that you want to export the private key (which will require a password), and then make sure you select the PFX output option.

Verifying the Signature

Verifying that you actually got the Digital Signature correct is one of the more frustrating parts of working with digital signatures in Office.

You’d think you’d be able to verify the signature via the Tools/Digital Signatures menu in the VBA editor screen:

image

image

image

image

If you get this far, you know that the signature was signed. You can check the valid dates on the certificate as well.

However, this screen does NOT show the date the signature was timestamped and that, unfortunately, is a key piece of information you need to verify the signature. In fact, although this screen purports to be showing the digital signature, this is really just information on the certificate used to create the signature.

Verifying the TimeStamp

To actually get information about the signature, and specifically the timestamp, you have to jump through a few hoops.
First, make sure that the template IS NOT in any of the autoload places (most commonly the Word STARTUP folder or the Excel XLSTART folder).

Next, make sure that security is set such that unsigned templates won’t automatically load without prompting.

image

image

image

Once you’ve done that, if you put the signed template, say, on the desktop and load it by holding down the SHIFT key, right clicking, and selecting OPEN, you should get the message bar indicating that there are security warnings.

image

Click the Options button and you should get a Security Alerts Window:

image

Click the Show Signature Details link to see the actual details of the signature itself:

image

Notice the title of this dialog is actually “Digital Signature Details”, not “Certificate Details”. And the Signing Time is indicated here, showing that, in fact, this digital signature was timestamped.

One final note. The Office 2007 and 2003 object model (and XP, but not Office 2000), contains properties for enumerating and retrieving information on document and template signatures. Specifically, the DOCUMENT object now sports a SignatureSet property, which is a collection of signatures on the document. From there, you can navigate through the object model to retrieve all the signatures on the document, as well as details (including the signing time) of those signatures.

However, there are significant differences between the models in 2007 vs 2003, so any code written to utilize those objects would need to accommodate those differences.

The above steps work similarly in all versions of Office from 2000 to 2007. I’ll try to capture screenshots of the process in Word 2000 at some point, to illustrate the differences.

Related links

Office 2000 Macro Security

OLEAUT32.DLL and Windows Vista

3
Filed under Uncategorized

I’d been working quite happily with VB6 and Windows Vista for several days, when, this morning, I ran head long into a very disturbing problem

I had a class open, and was trying to enter:

Private myvar as Boolean

but as soon as I hit SPACE after the AS, long pause and CRASH.

Every time. Completely consistent.

Poking around in the Application Even log yielded this:

Faulting application vb6.exe, version 6.0.81.76, 
time stamp 0x3592011f, faulting module OLEAUT32.dll, 
version 6.0.6000.16386, time stamp 0x4549bd95, 
exception code 0xc0000006, fault offset 0x0000d921, 
process id 0x17e4, 
application start time 0x01c7cade79735543.

Which seems to clearly point at OLEAUT32.DLL and, I’d guess, the TypeLibrary loading and handling stuff that VB6 makes heavy use of for Intellisense purposes.

My first thought at this point was, holy crap! I’m gonna have to go back to XP to be able to get a stable VB6 environment!

I googled a bit and came up empty.

Then, I heard this voice in the back of my head (no, not those voices, one of the rational ones<g>) that suggested checking the SP level of VB6. Sure enough, I hadn’t installed SP6 (remember, I just repaved this machine a week or so ago).

Interestingly, MS’s update gizmo hadn’t suggested SP6 as an update. Guess their most popular language doesn’t rate high enough on the important scale.

At any rate, I installed SP6 and tried the same coding, worked perfectly.

Lesson of the day, always make sure you snag all the SPs when repaving.

Well, at least that’s one minor panic attack avoided!

Sony MicroVault as MultiBoot System Tool

6
Filed under Hardware, Utilities

With the success I had with getting a bootable image of MFSTools onto my old 1GB USB stick, why not go all out.

My local Fry’s has on sale Sony MicroVault USB sticks with a slide out connector.

image

I picked up a 4GB model for 37$ and am thinking a multi-boot setup with multiple partitions.

  • MFSTools, for all my Tivo adventures.
  • DOS6.2 with all my various boot tools, SpinRite, etc.
  • Ultimate Boot Disk, with various OpenSource DOS’s, plus some Linux stuff to, I believe.
  • A BartPE Windows XP boot partition.

Anything else that might seem useful?

Niceties about the USB boot disk option:

  • It’s fast
  • You don’t have a reburn a DVD to make a change to the configuration
  • The sizes are to a point now as to be actually useful

I probably won’t toss my trusty DOS 6.2 boot floppies just yet, ’cause some of my machines can’t boot to USB, but I suspect that will be changing over the next year or so.

GroupWise HTML File Attachments

0
Filed under Uncategorized

And now, from the world of unbelievably arcane email minutia, comes this:

In GroupWise 7.00, create a new message, enter some text and bold a few bits, thus making the message HTML format.

Now, add an attachment, say a bitmap.

And finally, add another attachment, this one an HTML file called Text.htm.

Don’t send, but rather, just close the mail window, at which point GroupWise asks if you want to save the draft. Save it to some folder.

Now, go to that folder and open the email. Your Text.htm attachment has evaporated! The other attachment should still be there.

Same thing happens if you were to just send the email, which is quite handy when the file you wanted to attach is actually called “Text.htm”.

Turns out, this would appear to be a bug in the way GroupWise handles attachments and HTM emails. Internally, they save the HTM body of the email as a FILE attachment called, you guessed it, TEXT.HTM. In some cases, as when you simply send the email directly, GroupWise properly HIDES that Text.htm attachment from attachment enumeration. But in other cases, such as when you open that saved draft message and send it, GroupWise fails to hide the attachment properly.

Which means that if you’re enumerating attachments in an outgoing GroupWise email, you need to be aware of that or you might end up processing the body of the email as if it were actually an attachment. That may or may not be something you want to do.

At least with Outlook, the HTML body of the email is flagged in such a way that it doesn’t show up when enumerating normal attachments. You have to go out of your way to retrieve the HTML or RTF body text of a message.

Gotta love those gremlins!

Setting Up IIS7 On a Vista Machine

0
Filed under Uncategorized

I’ve got Vista Ultimate running on my freshly paved machine, and I finally got to a point where I want to get all my .NET stuff back and operational.

I retrieved my website from VSS (fortunately, it was all checked in and up on my server), and went to setup the Virtual Directory in IIS. Where’s IIS?

Come to find out Vista doesn’t install it by default, but it’s easy to get.

Click Control Panel, Program and Features, then

image

Click the Turn Windows Features On or Off

Find IIS in the list and check it. You might also want to check the FTP server while you’re there, but it’s not absolutely necessary.

Once, it’s installed, you’ll find an “Internet Information Services Manager” item on your Administrative Tools menu.

image

With DotNetNuke, one of the first things you have to do is change the Default Document to include Default.ASPX, the option is highlighted above.

When I tried this, I got an “Access is denied” error. Grrrr. More Vista Access Control crap, I thought.

image

I spent almost an hour digging around for any settings in the IIS Manager that I might need to change to be able to make this pretty innocuous change to the website config. Nothing.

Then, I happened to think….Maybe it’s because I pulled all the files from VSS. When you do that, files are automatically marked READONLY.

A little experimenting later, and turns out, you need to make sure that WEB.CONFIG (in the root of your site’s virtual directory), is NOT READ ONLY.

Duh.

I have to say thought, that error message window could use just a tad more information. Even the name of the file with the problem (WEB.CONFIG) would have probably saved me an hour of digging.

Seems to me error dialogs like this ought to always have a “»more” button on them. Most people will never click it, and it’d keep the general UI light and fluffy. But when you need it, it’d be there.

Pie in the sky, I suppose.

Should Software Developers Know Hardware?

2
Filed under Hardware, VB Feng Shui

I’ve worked in a variety of positions over the years, including staffing up entire development departments.

One element I usually insist on in new hires is a reasonably solid foundation of knowledge of basic PC hardware and Windows setup (I’ve generally worked in Windows shops, hence the bias there). Things like hard drive setup, FDISK, formatting, all the way to assembling normal PC components (i.e. box of parts to a working PC).

Granted, these days, it’s not particularly cost effective to actually build out  developer machines this way, but it seems to me that generally speaking, developers ought to know their way around under the hood, maybe not at the circuit level, but at least the component level.

Is this expecting too much? Not enough? I could always wimp out and say that it all “depends on the situation.” But I’m not talking about specialized hardware or device drivers. I’m talking about general business applications.

Or have computers become more like commercial airliners or helicopters, where the pilots fly, the mechanics fix, and never the twain shall meet?