walter01
8th September 2009, 10:18
Hi,

I'm using the below code to execute a VBS script on the client. It works fine but I need to find a way to prevent the DOS box (black screen) from flashing on and off. Any ideas ?


app_id = app_start(
"cscript c:\temp\ql560bc.vbs //B //nologo",
"",
"c:\temp\ql560bc.I",
"c:\temp\ql560bc.O",
"c:\temp\ql560bc.E"
)

or

app_id = app_start(
"cmd /q /c cscript c:\temp\ql560bc.vbs //B //nologo",
"",
"c:\temp\ql560bc.I",
"c:\temp\ql560bc.O",
"c:\temp\ql560bc.E"
)


Walter

george7a
8th September 2009, 11:11
I have solved this by developing a 1 line VB6 code executable, that forces the DOS box to stay minimized or even hidden.

walter01
8th September 2009, 14:21
Hi george,

Dit you just launch the vb script instead of executing it with cscript ?

bklunder
8th September 2009, 16:23
Have you tried wscript instead of cscript?

george7a
8th September 2009, 16:26
I needed to launch a dos program (not a VB script - but it is the same case), and the users were complaining about this black screen.

So in my app_start command I launched my VB6 program (one of its properties was that it has no form) and gave it the original DOS command as an argument. So my VB6 executed the DOS command in a minimized/hidden window.

I hope that helps,

- George

walter01
8th September 2009, 16:51
Thanks for your replies.
I have changed the appl_start argument from "cscript.exe..." to "c:\temp\ql560bc.vbs" which gives me the result I was looking for.

Walter