Blatantly snarfed from a post by Nicholas Riley on the macosx-admin mailing-list:
/Developer/Tools/SetFile -c <creator code>.
% launch -f /System/Library/CoreServices/Help\ Viewer.app /System/Library/CoreServices/Help Viewer.app: scriptable Mac OS X application package type: 'APPL' creator: 'hbwr' bundle ID: com.apple.helpviewer kind: Application [...]
The Finder actually uses a slightly different method, but this one is much more space-efficient.
% touch blah.html % /Developer/Tools/SetFile -c 'hbwr' blah.html % launch blah.html
and you'll see blah.html open in Help Viewer.