DOS window displayed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using the following code to run a bat file that downloads data that I
will import into my database. This works just fine.

Dim objShell As Object
Set objShell = CreateObject("Wscript.Shell")
Wait = True
objShell.Run "V:\FTP\GetDetail.bat", 1, Wait

When this code runs, the DOS window is displayed and the user can see the
commands being written. I would prefer that this be transparent to the end
user. Is this there some commad or code that I can use so the DOS window is
not visible to the end user. Thanks for the help........
 
JT said:
I'm using the following code to run a bat file that downloads data
that I will import into my database. This works just fine.

Dim objShell As Object
Set objShell = CreateObject("Wscript.Shell")
Wait = True
objShell.Run "V:\FTP\GetDetail.bat", 1, Wait

When this code runs, the DOS window is displayed and the user can see
the commands being written. I would prefer that this be transparent
to the end user. Is this there some commad or code that I can use so
the DOS window is not visible to the end user. Thanks for the
help........

You should be able to specify a window style to run the .bat file
minimized and keep the focus on the current active window. Try this:

objShell.Run "V:\FTP\GetDetail.bat", 7, Wait
 
Back
Top