Category Archives: Uncategorized

Those Pesky Internets

2
Filed under Uncategorized

Well, through an amazing set of circumstances, including spam filters gone awry, old email addresses that were no longer valid, too many years and too few vacations, somehow my domain name expired without so much as a whimper (that is, until I started getting IM from people and email through different accounts that went something like, “Hey, where’s your domain at, dude!?”).

Anyway, things are back up now, with all the pointers, DNS entries and hostnames back in place.

Also, I’ve obtained the domains vbfengshui.com and visualbasicfengshui.com, so they also point here, with all the mail and DNS forwarding goodness that is this series of tubes.

Opening a command prompt as Administrator, the easier way

0
Filed under Uncategorized

Over at Scott Hanselman’s blog, he just posted an interesting bit about hard resetting your network connection.

Good info, though I can’t say I’ve ever had the need to club it quite that hard.

Anyway, one of the comments struck me as FAR more useful, and something I did not know.

When you’re opening a CMD prompt, you can hold down CTRL and SHIFT as your press ENTER to open it as an administrator (after you supply the right password, of course).

This is a very handy little bit if you regularly have to pop onto normal permissioned user’s systems in order to load up the newest bits of some accounting package that can’t be installed without admin credentials, or if you’re insane enough to try developing under Vista with UAC turned on.

It smacks the heck out of:

RUNAS /USER:{machinename}\Administrator cmd

Sadly, it appears to only work under Vista, though.

Verbose MSI Logging

0
Filed under Uncategorized

I’ve found that many times when debugging an MSI install, it’s quite handy to get a full verbose log of what the install is doing.

You can turn on verbose logging from within the installation itself, at least when using InstallShield, but that has several drawbacks.

  • It’s implemented as a function of the InstallShield SETUP.EXE front end, so if a user dbl clicks the MSI file directly, it won’t log
  • It doesn’t apply during the UNINSTALL or the REPAIR operations, which are quite common and can also fail and require logging

To get a full MSI activity log, regardless of the activity, you need to modify a registry key:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer]

Logging=Voicewarmup

To turn it back off, just delete or blank the Logging value.

The logs will end up as random .LOG filenames in the user’s TEMP folder. It’s best to clean out your temp folder before running the install so the new LOG files will be easy to find. (or sort by date).

image

But doing all this manually can be a pain.

So here’s a little BAT file to take the edge off.

Just save it as MSILogging.bat (somewhere on your path for maximum utility), and then run it like so

MSILogging ON

MSILogging OFF

or just

MSILogging (no parm is the same as ON).

echo off
REM Simple batch to turn verbose MSI Logging on or off
REM command line option is ON or OFF (all lower or all UPPER case)

REM Create the reg file
set file=%temp%\$reg.reg
echo Windows Registry Editor Version 5.00>%file%
echo ;>>%file%
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer]>>%file%
if .%1.==.ON. echo "Logging"="voicewarmup">>%file%
if .%1.==.on. echo "Logging"="voicewarmup">>%file%
if .%1.==.. echo "Logging"="voicewarmup">>%file%
if .%1.==.OFF. echo "Logging"="">>%file%
if .%1.==.off. echo "Logging"="">>%file%

REM for testing purposes
REM type %file%

REM Apply it with Regedit (you'll need to have rights)
REM /s makes it silent
regedit /s %file%

REM Could uncomment this to remove the temp file when done
REM del %file%

 

And no comments about my lame bat file case insensitive batch scripting<g>

Even better, add a line at the end:

copy %temp%\msi*.log .\

and all those log files will end up in your current directory (instead of making you go fishing through Documents and Settings to find them), although this may suit some people more than others.

Don’t forget those ancient SPs!

0
Filed under Uncategorized

I had started doing a little regression testing on a product I work on recently. I’d been doing my dev under Vista with Office 2007, so I thought it’d be good to go back to Office 2000 for a bit.

I uninstalled 2007, installed Office 2k, then reinstalled Office 2007, rebooting along the way as is the norm (geez and here I thought it was 2007!).

Anyway, I fired up Word 2000, loaded a few doc files, closed it and did the same with Word 07. Everything looked good, so I fired up my app from within Word 2k. As Bob Kane might say, BOFF – BIFF – BLAMMO – KERPOWEE!

Hmmm. I actually crashed Word. That doesn’t happen too often (at least not anymore<g>).

So I started looking back through the relatively few changes I’d made to the code since the last time I knew it DID work under Word 2k. Nothing popped out.

So I stubbed out most of my code and discovered the problem was that when I was closing the Word document, via Application.Documents(x).Close, the document wasn’t actually being closed. Word still had it open. Which screwed up everything there after. Plus, virtually all my code dealing with Range locations (ie where things like fields and pictures are located in a document) was crashing Word left and right.

Now I’m starting to get a little panicky. I couldn’t have screwed things that badly.

So I’m staring at it blankly for a few minutes when it dawns on my. I don’t think I installed any service packs for Office 2k!

Hmm, check versions, sure enough, I hadn’t.

Ok, so do I have to uninstall Office 2007 again, just to get the old SPs on for 2k? I decide to throw caution to the wind and just start up the Office SP1 install, followed immediately by the Office SP3 install (SP3 didn’t roll up SP1 back in the day, wouldn’t you know).

Viola! My app’s running just fine, no crashes, documents close properly, etc.

Moral of the story. With those old apps (and OS’s, what with VMs being all the rage for testing), don’t forget the SPs!

Voyager still going

0
Filed under Uncategorized

Just happened upon this page about the current status of Voyager 1 and 2.

image

Those bots are still going, some 9.5 billion miles from here.

The page is pretty boring stuff, till you realize, these are commands and responses sent to robot spacecraft launched 30 years ago, which are now outside our solar system!

With any luck, my kid’s kid’s kids will get to take a day trip out to check out their progress and be back in time for dinner.

Handy Context Menu Stuff

0
Filed under Uncategorized

I put together a little REG script ages ago that added context menus for DLLs, and EXE’s for registering and unregistering them.

I use it all the time. So much easier than invoking regsvr32 manually all the time.

Anyway, I just stumbled upon Chris Sells’ version of this script, which one-up’s mine in that he uses REGTLIB.EXE, which comes with VS6, to also register and unregister TLB and OLB files. 

And who knew that utility even CAME with VS6? I somehow have completely missed it all these years.

Offline Web Apps

1
Filed under Uncategorized

Jim Rapoza writes an interesting article in the latest eWeek about the 5 things that Web 2.0 apps need to recognize to be successful. It’s called IT Planner – 5 Steps to Next Generation Web Apps

  • Build Rich web apps. Ok pretty general, but a good start, I suppose
  • Remain “Open” minded. Open with your data, open to open-source, etc 
  • Keep Data Dynamic. Basically, allow users to play with it locally instead of only processing on the server. Sounds good, if not a bit like the “open minded” idea above. 
  • Make it available offline. Sure.
  • Be Flexible. Allow your app to be “molded” which ever way a user might like. Interesting idea. Basically, “make it configurable, and easy to import and export data”. Hmm, sounds a lot like the 2’nd item also.

All pretty good ideas for…..wait…..what was that? “Available offline”?

Huh? A web app available for offline use. Why, that’s just scandalous. Not too mention soooo last decade.

So. If I’m to understand this properly, one of the next great things in web applications is…. drum roll…. the traditional fat client desktop app.

And the circle remains unbroken. <Sigh>

Stuff you didn’t know you had

0
Filed under Uncategorized

When I switched to Vista, at least one of the pieces of software I used occasionally got fragged, ReadIris OCR.

It was the free one that came with my OfficeJet G85, but hey, it worked quite well for what I needed, when I’ve needed it.

Anyway, it sort of installs under Vista but then complains about not being able to load FMTSAM.DLL and barfs. And they don’t even give you a proper uninstall for that package. Gah!

So after hacking through Borneo the registry and Program Files to remove the aborted ReadIris install, I went looking for OCR packages, and came across a mention of Microsoft Office Document Imaging.

Sure enough, this is a little “Office Tool” that was bundled beginning with Office 2003, so you very well might already have it on your machine.

It does several things, but the most interesting for me (at least right now), is the OCR capability.

Point it at a multi-page TIFF file (yes, it only recognizes TIFF files, and same wacky proprietary MS format), click the “Send to Word” button and presto-chango, you have text from an image (or scan or whatever).

What, you say, you don’t have your stuff in TIFF format?

Load up Word, paste your images in, select Print and choose the Microsoft Document Office Image Writer printer (at least, in Word 2007, not sure about 2003 for this one):

image 

It’ll generate a multi-page TIFF file as the printout of your document, that you can feed directly into Document Imaging.

And the best part, it seems to actually to a decent OCR.

Colonel Sanders and Willie Nelson’s Love Child a Geek Demigod

0
Filed under Uncategorized

I’ve got nothing but love and respect for Whitfield Diffie, and I’ve known the name for ages (after all, you don’t invent public key encryption and NOT become famous in geek circles)!

There’s a short interview with him in the latest ComputerWorld, and now, I gotta say, I have even more respect for the guy.

He’s a fellow at Sun, full-on genius, and pulls off the Colonel’s beard with a good ol’ Willie haircut.

image

Ya gotta respect that!

Office Desk

0
Filed under Uncategorized

I finally finished out my dream desk. Actually, I finished it out a while back, but just thought about posting here. Maybe it’ll inspire other cabinetry-hackers like myself.

I started with an electrically height-adjustable corner lab bench. Used office supply place, about 100$. This allows the entire desk to lift up to standing height, for those long conference calls where I have to walk around some.

Removed the top. It’s now a workbench in a corner of my dad’s shop.

Welded up a support frame from an old bed rail. You can see that in a pic of the underside of the finished desk here:

image

Built up the table top from 3/4″ MDF, oak baseboards, oak 1x4s and green/gold slate tiles. Here’s a pic of the MDF base, plus the border and edging. The tiles are set in the center area, about 1/4″ below the surface of the border boards. The notch is for the adjustable keyboard/mouse tray.

image

Biscuit joined oak 1x4s with pecan trim to make an adjustable keyboard tray. This was the mockup:

image

Filled the tile area with about 3 gallons of epoxy (to give it that super wet, super thick, bar countertop look, and to fill it up to the same level as the border). Stained everything a custom red mahogany.

And bolted it all together to get this (I left the keyboard in place to give a sense of scale, ignore the office, it’s in its normal state of disarray). The most nerve wracking part of the whole build was having the entire piece completely built, stained, with the tiles glued and mortared in place, and then mixing 3 gallons of epoxy to pour over it. Screw that up and the whole thing would have had to go on the trash.

image

This shot gives a little better look at the keyboard tray and overall desk, and it shows off the gloss of the epoxy top:

image

and this one shows off the tiles:

image

Now, granted, it’s not quite as cool as David Barry’s Tie Fighter Desk, but it works a little better for video conferences<g>

image

However, I don’t have drawers. Maybe I could do a Jawa Sandcrawler filing cabinet…

Any other cool/practical desk hacking out there?