Prev: Simple hack to get $800 to your home.
Next: call vbScript from vba or convert vbscript to vba(Access 2007)?
From: ChrisFromFlens on 7 Jun 2010 09:14 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
From: Mayayana on 7 Jun 2010 09:58 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> | 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
From: ChrisFromFlens on 8 Jun 2010 03:36
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 "Mayayana" wrote: > 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> > |