0
For some reason I need to run a (hopefully simple) sh
file under Windows and be able to do so from another application. I can do that using cygwin, but for various reasons I need this operation to be easy to reproduce on another machine (installing cygwin on another machine is out of question).
The first logical step was to copy sh.exe
to another location and try running it in Windows cmd
. I got a few "missing library" errors, but after copying:
- cyggcc_s-1.dll
- cygreadline7.dll
- cygncursesw-10.dll
- cygiconv-2.dll
- cygintl-8.dll
- cygwin1.dll
I can run sh.exe
in cmd
.
I tried running the sh
file with this copy of sh.exe
, but now I get an error that gawk
is missing. I tried to copy gawk.exe
(and necessary libraries) to the same folder, but sh.exe
can't see it (I also tried copying gawk-4.1.1.exe
, but the result was the same).
I suspect sh.exe
looks for some environment variable which would then point to the location of dependencies (such as gawk.exe
), but I'm not sure what environment variable it is and if sh.exe
respect plain windows environment variables.
So my question is, can I run sh.exe
under Windows cmd
(and eventually directly in windows) and if yes, then how do I go around the problem described above?