1
votes

I am trying to use the uses statement to implement something like in the following example:

uses Process;
...
var s : ansistring;
...
if RunCommand('/bin/bash',['-c','echo $PATH'],s) then
   writeln(s);

The uses statement causes an error during compilation. Any idea why?

1
/bin/bash? Inno Setup is Windows application, not *nixMartin Prikryl

1 Answers

1
votes

There's no uses statement in the Inno Setup/Pascal Script.


You can use only the functions listed in Inno Setup documentation.

To add new functions, you have two options:


Anyway, to answer your real question, use the Exec function.

To collect an output of the executed command, see How to get an output of an Exec'ed program in Inno Setup?