I'm trying to call gfix.exe(Interbase utility) from Delphi application to shut down my database(I need to backup it afterwards). To get results of running gfix.exe I use syntax like this:
run := 'C:\progra~1\firebird\firebi~1\bin\gfix.exe -shut -force 30 c:\totalpak\data\newfarm.gdb -user duduser -pass fakepassword 2> c:\errout.tm';
RunAndWait32 is a quite common procedure using CreateProcess and WaitForSingleObject.
It doesn't work this way and does not redirect gfix output to errout.tm.
If I put RUN string into bat file and then do: RunAndWait32('mybatfile.bat', sw_hide) it doesn't work either(does not create errout.tm file). But if I run this bath file from within windows environment it works just fine.
Anyone has any clues ?