The Wizard of X – Oppa PlugX style, Part 2

Every once in a while I come back to have a second look at some stuff from the past. Today I had a quick look at xwizards.dll that I wrote about before and noticed that I forgot to mention one more thing.

The exported function RunWizard takes GUID as an input. If you register a DLL under a GUID of your choice you can load the DLL via xwizard.exe e.g.:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID]
"CLBVersion"=dword:00000012

[HKEY_CLASSES_ROOT\CLSID\{11111111-1111-1111-1111-111111111111}]
@="foobar"

[HKEY_CLASSES_ROOT\CLSID\{11111111-1111-1111-1111-111111111111}\InprocServer32]
@="C:\\test\\test.dll"
"ThreadingModel"="Both"

will register c:\test\test.dll under {11111111-1111-1111-1111-111111111111} GUID. All we have to do now is run:

  • xwizard RunWizard {11111111-1111-1111-1111-111111111111}

Less known command line args of MSOHTMED.EXE

Update

After I posted it @0gtweet provided a feedback which I used to update the post. Thanks!

Old Post

This is just a blurb about a MSOHTMED cmd line arg I have not seen documented previously. Not sure if it can be used for anything special, but documenting it for the sake of it anyway.

MSOHTMED.EXE /oN <file>

will open <file> with a following program chosen depending on a value of N:

  • 0 – Word
  • 1 – Excel
  • 2 – PowerPoint
  • 3 – Access
  • 4 – Sharepoint Designer
  • 5 – Publisher
  • 6 – Project
  • 7 – Visio
  • 8 – OneNote
  • 9 – ForeFront (not confirmed!)

If a target app is not installed, the file will be opened by Word.