how do I hide a console window when running a script from an HTA 
Author Message
 how do I hide a console window when running a script from an HTA

When running a script from within a .HTA I get a black console window
popping up.  I am using shell.Exec and cscript.  I also only get
access to the cmdOut after the job has finished running.  I have seen
several inconclusive threads on this, but no solution.

I would like:

1. not to see a console window at all

2. be able to capture the status messages as they are written, so that
I can redisplay them in real time.

Anyone have a solution?



Mon, 20 Sep 2004 20:30:29 GMT  
 how do I hide a console window when running a script from an HTA
No. :(

I've asked. The Exec method uses a visible console.  Workarounds I know about:

(1) Use a tool such as AutoItX to hide the console.  This is what I've tried ( I have code samples if you want).  Drawback is that it freezes the window while it does its thing, which is even uglier.

(2) Use the Run method instead and redirect output to a file.  Read the file when done.  Not very nice.


Quote:
> When running a script from within a .HTA I get a black console window
> popping up.  I am using shell.Exec and cscript.  I also only get
> access to the cmdOut after the job has finished running.  I have seen
> several inconclusive threads on this, but no solution.

> I would like:

> 1. not to see a console window at all

> 2. be able to capture the status messages as they are written, so that
> I can redisplay them in real time.

> Anyone have a solution?



Tue, 21 Sep 2004 00:16:26 GMT  
 how do I hide a console window when running a script from an HTA
Hi All,

 you can run the comamnd with help of WMI. This will work.

Best regards,
Manfred Braun

[You have to remove the underscores to mail]

"Alex K. Angelopoulos" <alexangelopoulos_at_hotmail_dot_com_remove__> wrote

No. :(

I've asked. The Exec method uses a visible console.  Workarounds I know
about:

(1) Use a tool such as AutoItX to hide the console.  This is what I've tried
( I have code samples if you want).  Drawback is that it freezes the window
while it does its thing, which is even uglier.

(2) Use the Run method instead and redirect output to a file.  Read the file
when done.  Not very nice.



Quote:
> When running a script from within a .HTA I get a black console window
> popping up.  I am using shell.Exec and cscript.  I also only get
> access to the cmdOut after the job has finished running.  I have seen
> several inconclusive threads on this, but no solution.

> I would like:

> 1. not to see a console window at all

> 2. be able to capture the status messages as they are written, so that
> I can redisplay them in real time.

> Anyone have a solution?



Fri, 24 Sep 2004 04:25:25 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Running programs from a HTA (without Windows Scripting Host)

2. running console app in same console

3. run external command in same console window

4. Stopping a hidden console application

5. Displaying Hidden Command Console Backgroud Process

6. Running DOS Shell in hidden window, or using vb command instead

7. Hiding a DOS window when running a bat file

8. IE window close after script is done

9. Scripting HTA's HTA:APPLICATION Navigable property

10. hide logon script window

11. Check Application running on console

12. how to run a program and same the output to the same console

 

 
Powered by phpBB® Forum Software