Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

NSIS runCommand function

Is it possible for srputil::runCommand to Run a function that returns a value back to NSIS? I've tried using calling Send_Info() in the function as well, but it doesn't seem to return in $0 or $1.

Cheers, M@

Comments

  • Unfortunately, this is not currently supported. RunCommand was designed as a subroutine caller, not a function caller. $0 will contain "1" if the call succeeds or an error message if it fails. Any information from Send_Info() is just pushed to the NSIS UI. At the time I wrote runCommand, I only had in mind the desire to run "rdkinstall" and possibly other simple subroutines. Any logic beyond that I intended to put into a self-contained OI routine rather than having NSIS process return values. This was, in large part, due to NSIS being a rather annoying language when it comes to the syntax of writing conditions and processing function calls.

    If this is a considerable need, I can commit to putting it into my queue, but be aware that my plate is rather full at the moment so a solution wouldn't be immediate.
  • Thanks Kevin - just wondered if this was a feature. I've got around it by writing the result to a temporary file which NSIS can then read. I just want to determine if the OE licence has expired before proceeding with an upgrade.

    Cheers, M@
Sign In or Register to comment.