Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MSHTA.EXE starts invisible

100 views
Skip to first unread message

ChrisFromFlens

unread,
Jun 7, 2010, 9:14:14 AM6/7/10
to

Hi,

I'm running a set of vbscripts on different machines (XP and W2k). My
Problem is, that at the end of the process I want to see a hta, but
sporadicly the mshta.exe is running, but it's invisible. I can tell that's
it's working by watching the processlist and by provoking a reaction of the
hta, it's just not visble.

My vbscript starts a Batch by using the wshshell.run method:

set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.run("c:\mybatch.cmd", 7, true)

Everything is fine until here.

"mybatch.cmd" starts "showit.vbs":

start "c:\showit.vbs"

Still everything fine

"showit.vbs" starts "myapp.hta":

set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.run("c:\myapp.hta", 1, false)

This is whe my problem appears. The mshta-process is running, but the hta
will not appear on the deskop. I've not been able to provoke this, it just
happens sometimes.
BUT:
The hta works just fine as long as I'm starting it directly without having
any scripts or batches calling it.

Any ideas?
Christian

Mayayana

unread,
Jun 7, 2010, 9:58:42 AM6/7/10
to
I don't know whether this will solve it, but did you try
the HTA attributes?

<HEAD>
<TITLE></TITLE>
<HTA:APPLICATION SHOWINTASKBAR="yes" WINDOWSTATE="normal">
</HEAD>

ChrisFromFlens

unread,
Jun 8, 2010, 3:36:38 AM6/8/10
to
Hi Mayayana,

thanks for the hint, I was already using the WINDOWSTATE="normal", but I
haven't had the SHOWINTASKBAR="yes" in it.
I'll try and keep you posted

Christian

ChrisFromFlens

unread,
Aug 31, 2010, 2:06:06 AM8/31/10
to
Ok, meanwhile I found the reason:
There's a vbscript running on the computers, and in certain situations this
script is started by the command "at" as a scheduled task.
If this script starts the HTA, the HTA is a son-process of the taskplanner ,
which is not allowed to communicate with the desktop, and so the HTA is not
allowed to communicate with the desktop as well.... it runs invisible.

Don't know how to get the vbscript restartet once it crashed, but that's
another problem;)

Greets
Christian

0 new messages