DOS window displayed

J

JT

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........
 
D

Dirk Goldgar

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top