Command line switches

Please post all questions relating to Help & Manual 6 here!

Moderators: Alexander Halser, Tim Green

Post Reply
BTM Dave
Posts: 5
Joined: Tue Jun 17, 2014 3:26 pm

Command line switches

Unread post by BTM Dave »

Hi Tim / Alexander,

In order to be able to generate our documentation in a Batch Process, we have moved our Help&Manual Application to a none Production Server. Which has all gone well and we are up and running no problems.

But in trying to set up this Batch process we have come across a problem, which is that whatever form or syntax we use on the second "/CHM" parameter, the file name we use is ignored, and the Help&Manual application picks up the default name from the last time the application was used. Which causes a file / folder not found error, as the last time the application was used was from an interactive session with differently mapped output drives.

This is an example of one of the commands we have tried...

"\\NL1008FS\HelpManual\HelpAndManual6\HELPMAN.EXE" "\\NL1008FS\DOCU\BTM Documentation Project.hmxp" /CHM="\\NL1008FS\DOCU\DEFAULT.chm" /I=CHM,DEMO,CLIENT1 /L=Jan.txt

And these are the messages that we receive consistently

[Error] Compilation of \\NL1008FS\FTP_Site\DOCU\BTMDoc\BTM Documentation Project.hmxp started 9/16/2014 2:48:51 PM
[Error] Cannot create folder C:\Users\6305joliemeulen\Desktop\LocalDocumentation

Thanks,
Dave
User avatar
Tim Green
Site Admin
Posts: 23175
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Command line switches

Unread post by Tim Green »

Hi Dave,

It looks as though you have a permissions problem somewhere here. Also, it looks as though the spaces in the project name are causing an error, because the only "documentation" folder that the system could be trying to create would be with a misinterpretation of part of the project name as a folder name. Try changing the project name to exclude all spaces, and also make it match the name of the output CHM file exactly (see below for more details on this). Also, you don't need to include the full paths in anything coming after the path to the project. All references in switches like /CHM can be relative, because the project path is taken as the default directory and you can write paths relative to that, like this:

Code: Select all

"\\NL1008FS\HelpManual\HelpAndManual6\HELPMAN.EXE" "\\NL1008FS\DOCU\BTM_Documentation_Project.hmxp" /CHM="DEFAULT.chm" /I=CHM,DEMO,CLIENT1 /L=Jan.txt
This will write the CHM in the \\NL1008FS\DOCU\ folder.

Before doing anything else, please also make sure you are using the current version of the program, which you can check with Help > About. The current version of HM6 is 6.5.1 Build 2975. You can download the installer here (just install on top of your current version to update):

http://www.helpandmanual.com/downloads.html

Your projects should not have spaces in their names when compiling CHM, and ideally the project name should always be chosen so that it can exactly match the name of the CHM with all valid characters and no spaces. If the project and CHM name don't match you will get problems with references between projects when using runtime merging in CHM. Also, you should never try to do anything at all with CHMs on network drives because Windows now totally blocks all access to CHM on all network drives. Your output folder should always be local.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
BTM Dave
Posts: 5
Joined: Tue Jun 17, 2014 3:26 pm

Re: Command line switches

Unread post by BTM Dave »

Hi Tim,

My name is Jan. I am a colleague of Dave and I am responding under his name.
Thanks for your answer. We have installed the latest version but unfortunately the problem is not solved. We understand your other remarks but they are not really related to our problem. Until now we had no problems.
But now we are trying to start a batch process from the iSeries with RUNRMTCMD (run remote command) by starting a bat file. No matter what we try, the given output file is ignored and H&M uses the name that was used the last time. Next command:

Code: Select all

"\\NL1008FS\FTP_Site\HelpManual\HelpAndManualV651\HelpAndManual6\HELPMAN.EXE" "\\NL1008FS\FTP_Site\DOCU\BTMDoc\BTM Documentation Project.hmxp" /CHM="DEFAULT.chm" /I=CHM,DEMO,CLIENT1 /L=Jan.txt
ignores the /CHM part.

If you have other suggestions or ideas, feel free to share it with us.

kind regards,
Jan
User avatar
Tim Green
Site Admin
Posts: 23175
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Command line switches

Unread post by Tim Green »

Hi Jan,

The next thing you can do is set the /debug switch in your command line. Set it at the end of the line. This opens a modal window before publishing that shows the batch commands and whether they have been recognized correctly. (Don't leave this set in normal batch operation because the modal window will interrupt the process.) This could give you some information about whether there is any problem with the paths you are choosing.

This may be obvious, but also make sure that the CHM compiler (HTML Help Workshop) is installed on the build machine with permissions the user group you are using to run the batch process and for accessing the folders you are using. Open Help & Manual on the build machine and check that the compiler is registered correctly in View > Program Options > Compilers. If you need to, you can get the compiler installer here.

NOTE: The compiler installer will issue a misleading message saying that you "already have a newer version of HTML Help". This has nothing to do with the compiler and should be ignored. It refers to the components for displaying HTML Help, which are always newer than those in the compiler package because it has not been updated since it was released with Windows 98.

Another thing you can try is to rewrite the batch file for local use on the build machine using local rather than network paths. Then store the batch file on the build machine so that it executes there, and only call it from the remote machine.

It might look like this (you don't need the project path if the batch file is saved in the project folder):

Code: Select all

"C:\Program Files\HelpManual\HelpAndManualV651\HelpAndManual6\HELPMAN.EXE" "BTM Documentation Project.hmxp" /CHM="DEFAULT.chm" /I=CHM,DEMO,CLIENT1 /L=Jan.txt
Save that as a .cmd file on the build machine in the project folder, for example defaultCHM.cmd, and then call it from the remote machine like this:

Code: Select all

"\\NL1008FS\FTP_Site\DOCU\BTMDoc\defaultCHM.cmd"
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
BTM Dave
Posts: 5
Joined: Tue Jun 17, 2014 3:26 pm

Re: Command line switches

Unread post by BTM Dave »

Hi Tim,

First, I changed the map of the compiler (I copied it before to the correct drive but I forgot the properties...), then I run into an error code 87.
Second, I let the system administrator reinstall the compiler (I read a previous tip from you to someone else), and that did the trick!
It is working now.
Thanks a lot!

Kind regards,

Jan
Post Reply