Skip to main content
Known Participant
January 24, 2023
Question

Command line: power shell : -- cl invalid argument

  • January 24, 2023
  • 1 reply
  • 370 views

Hello everyone. I am trying to export my projects from a 'master' project which is linked with 'children projects'. I wrote the instructions in a *.bat file and specified a environment variable (path of robohelp)
Here is an example of my first line of code:

"C:\Program Files\Adobe\RoboHelp 2020\RoboHelp.exe" --cl "D:\OLH\05_Tests_RH_2020\input\Master_project.rhpj" -o "FORCE" -p "D:\OLH\05_Tests_RH_2020\compilations\command_line" -l D:\OLH\05_Tests_RH_2020\log_tests_compilations\master.html

The other lines allow to compile the child projects. The result is correct and everything seems to work well (either the files are correctly exported).

I still get error messages that look like this:

(node:23060) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

I don't really understand why because i thought this problems where solved with the build version i have.

So I tried to compile my projects with PowerShell but it seems that the --cl argument is not recognized.

Being a beginner, I would like to have your opinion on this line:

Set-Location 'C:\Program Files\Adobe RoboHelp 2020\RoboHelp.exe' --cl 'D:\OLH\05_Tests_RH_2020\input\Master_project. rhpj' --output 'FORCE' --path 'D:\OLH\05_Tests_RH_2020\compilations\command_line' --log 'D:\OLH\05_Tests_RH_2020\log_tests_compilations\Master_project.html'

I replaced the -o and -p argument with --output and --path because i had errors messages during the script execution.

I used PowerShell with RH 2017 and i had no problem.

I have read the online help and advice given in this page:
https://www.grainge.org/pages/authoring/rh_tour/rh2020/outputs/command_line.htm 

But it doesn't work.

So, here are my questions :
- why my *.bat returns errors messages even if i'm up-to-date (RH 2020.8.34)

- where is the problem with my PowerShell script.

As cmd seems to be deprecated in the future, I would prefer my PowerShell script to work 😉

 

To complete, i'm a Window 10 user.

 

Thank you very much for the answers.

    This topic has been closed for replies.

    1 reply

    Community Expert
    January 24, 2023

    I'm not an expert, but this page suggests Set-Location only wants a folder, not a file. https://learn.microsoft.com/en-us/powershell/scripting/samples/managing-current-location?view=powershell-7.3

     

    So assuming the cmd script doesn't work then I assume you need to set the path, then have another command to run the robohelp command line arguments. But I don't know how sorry. If Peter doesn't have further information I would suggest contacting Adobe Support. The email address is recommended as it goes to a dedicated team.:
    https://helpx.adobe.com/contact/enterprise-support.other.html#robohelp

    Known Participant
    February 1, 2023

    Thank you for your answer Amebr. 

    I have not yet found the right code to use RH in PowerShell. I have completed my cmd with the allocation issues. The compilations come to completion 95% of the time. So I just have to watch the cmd run. I will contact support as you advised. Thank you. Have a nice day.

    Known Participant
    February 1, 2023

    I will give the workaround given by the Adobe support when i will have an answer.