For one of the projects we are working on, we need to make sure our end user documentation matches correctly the template provided by the customer. I have started playing with one of the products that the Patterns and Practices at Microsoft is using to generate their documentation. Take a look at their package: http://www.codeplex.com/doctools
After going through all of the installation and pre-requisites. I was ready to try the sample Word Document they provide. Snag.!
First thing I notice is that the sample scripts are looking for the Microsoft DocTools in the c:\program files\Microsoft DocTools. Changing those scripts brought to my attention that the install program gives you the ability to specify the path on where to install the DocTools. However, it will always install to the (x86) directory on my Vista x64.
The main error I was getting was:
PS C:\DocToolsDemo> .\HTML.cmd
C:\DocToolsDemo>PowerShell ConvertToHTML.ps1 ESBIntro.docx .\outputHTML """C:\Program Files (x86)\Microsoft DocTools\Document Converter\Formatting\MSDN2\xsl""" convertESBConfig.xml
Directory: Microsoft.PowerShell.Core\FileSystem::C:\DocToolsDemo
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 10/1/2008 9:10 AM outputHTMLDirectory: Microsoft.PowerShell.Core\FileSystem::C:\DocToolsDemo\outputHTML
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 10/1/2008 9:10 AM html
Add-PSSnapin : No Windows PowerShell Snap-ins are available for version 1.
At C:\Program Files (x86)\Microsoft DocTools\Document Converter\ConverterLibrary.ps1:9 char:15
+ Add-PSSnapIn <<<< ppConverter.Cmdlets
--Splitting: C:\DocToolsDemo\ESBIntro.docx
An Error Ocurred: The term 'Split-Document' is not recognized as a cmdlet,function, operable program, or script file.Verify the term and try again.PS C:\DocToolsDemo>
After doing all of the regular stuff (check PATH, re-install, start/stop program, google), I could not get this error to go away.
The problem seems to be with the OS I am running. Since I am running a 64bit OS, I need to call the PowerShell that is on the c:\windows\syswow64 and not the one in the regular 32bit. This is accomplish by running the one marked with the (x86)
Once I opened this one, ran the set-executionpolicy remotesigned command. It ran and split the Word document successfully and generated my HTML help compile file.
One of those simple bugs that can waste a whole hour for you.!
No comments:
Post a Comment