Run a bat file using lotus script

Hello,

I have this code which work fine. This code executes batch file but leaves Command Prompt screen open in the back ground.

The problem is the agent will execute manually multiple times. So for every single click it will run and in the background command prompt screen remains open until closed manually.

Is there a way to close that background command prompt screen?

Thanks in advance.

MS

Code

On Error Resume Next		

Dim intTemp1 As Integer

intTemp1 = Shell(“\servername\Batch_Files\test.bat”)

On Error Goto Errormessage

Exit Sub	

Errormessage:

Msgbox "Batch file error !!"

Exit Sub

Subject: Run a bat file using lotus script

How about putting an ‘exit’ as the last command in the .bat file?

Frunobulax

Subject: RE: Run a bat file using lotus script

Thanks. It worked.

MS