hii friends

plz help me.
i m new in VB. I hav a .bat file. i tried executing this file in VB6.0. bt i cant execute tht correctly.u\i tried using shell command
Shell("D:\USB\MY FINAL PROJECT\RECOGNIZER\recognizer.bat", 1)

i hav to run d .bat file and only aftr the execution of bat file the other task shud b done
if i directly open d bat file , its working....plz help.....very urgent.............

plzzzzzzzzzzzz


thanks in advance

Private Sub Form_Load()
    Shell "D:\test.bat", vbNormalFocus
End Sub

Or

Private Sub Form_Load()
Dim dTaskID As Double
    dTaskID = Shell ("D:\test.bat", vbNormalFocus)
End Sub

hiiii
thanks for ur reply....i tried tht several times....command prompt just appears and goes...i hav to complete d execution of bat file.....thts nt possible......plz help

Private Sub Command1_Click()
Shell "D:\USB\MY FINAL PROJECT\RECOGNIZER\recognizer.bat", vbNormalFocus
End Sub

Private Sub Form_Load()
    Shell "D:\test.bat", vbNormalFocus
End Sub

Or

Private Sub Form_Load()
Dim dTaskID As Double
    dTaskID = Shell ("D:\test.bat", vbNormalFocus)
End Sub

hiiii
thanks for ur reply....i tried tht several times....command prompt just appears and goes...i hav to complete d execution of bat file.....thts nt possible......plz help

it means problem happened with your bat file.
Try to open other program, like exe file.

Shell("D:\FCM.exe", vbNormalFocus)

i tried and works fine

it means problem happened with your bat file.
Try to open other program, like exe file.

Shell("D:\FCM.exe", vbNormalFocus)

i tried and works fine

hiiiii

whn i execute tht bat file from my folder it works correctly.....

then y?

Hi,
actually the .bat file is executed fine. Can u show the .bat content? because when .bat file execution finished the command prompt closes. If it requires any input from user then only it prompt the user. otherwise it closes. Check whether the commands inside the .bat files are executed. For example you may give mkdir c:\somedir , this create directory in c:. Also specify what you expect from the .bat file.

Hi,
actually the .bat file is executed fine. Can u show the .bat content? because when .bat file execution finished the command prompt closes. If it requires any input from user then only it prompt the user. otherwise it closes. Check whether the commands inside the .bat files are executed. For example you may give mkdir c:\somedir , this create directory in c:. Also specify what you expect from the .bat file.

hii
plz help yaaaaaaaaaarr

this is the bat file content
HVite -A -D -T 1 -C config2.txt -g -H hmmsdef.mmf -w net.slf dict.txt hmmlist.txt
plz help

hii its an exe which is in speech processing toolkit. all tht follows are arguments to tht

it records the speech and tries to recognize tht
actually i m doin a speech recognition project....

so only aftr recoding completes i hav to close command prompt

Why dont you try directly with shell function Shell "HVite -A -D -T 1 -C config2.txt -g -H hmmsdef.mmf -w net.slf dict.txt hmmlist.txt"

hiii
thanks a lot
finally i gt it
i gav the command itself

Hi,
Is the coding Shell "HVite -A -D -T 1 -C config2.txt -g -H hmmsdef.mmf -w net.slf dict.txt hmmlist.txt" working?

This article has been dead for over six months. Start a new discussion instead.