Hi,
I have a batch file which does a o/p redirection like the following :
I have a VB code which call the above batch file :Code:@echo off :BEGIN cls rsh <ip> -l <username> "if ps -efW | grep \"abcd\" >/dev/null 2>/dev/null; then echo 1 ; else echo 0 ; fi;" > file_already_running for /f %%a in (file_already_running) do ( if %%a==1 ( echo 0 > error_level ) else ( echo 1 > error_level rsh <ip> -l <username> -n "cd c:/dd/; ./abcd.exe -t \"101\" -i \"abcd.ini\" >/dev/null 2>/dev/null </dev/null &" ) exit /b ) :End
While I am running the bat file directly from dos prompt, the files file_already_running and error_level are created properly, but while calling it from VB, these two files are not created.Code:Private Sub Command1_Click() Dim ret As String Dim strCommand As String Dim val_error As Integer ret = Shell("c:/sample.bat", vbHide)
Please help.
-SukumarM


Reply With Quote




Bookmarks