1

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?

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Shachar
  • 95
  • 4

1 Answers1

1

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?

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
  • 1
    Thanks @Martin Prikryl. That first part answers my question. What i am actually trying to achieve is to run the tzutil application and use the returned value (string or integer) – Shachar Jun 15 '16 at 07:16