Got an issue with a pair of scripts.  .vbs spawns an .hta that provides a
status display of what's going on in the .vbs script (they communicate via
the registry).

 

The .vbs will be used as a startup script.   For testing, I also run it from
the command line.

 

Originally I started the .hta using a WshShell.run method and the mshta
command.  That worked OK - the mshta window opened on top (from the command
line) and was visible when run as a startup script.  

 

But mshta.exe starts up with a much larger window than I want.   Yes, I can
resize it from within the .hta but that's a workaround, not a solution.  I
want to solve this problem:

 

THE PROBLEM:

If I use Win32_Process.Create method to spawn mshta, I can specify its
initial window size and position.  But the mshta window opens beneath all
other windows.  Not a problem, since I have the PID of the mshta process
returned from Win32_Process.Create, I can AppActivate that window to put it
on top.  Works great running the script from the command line.

 

But as a startup script, the .Create'd mshta window is AWOL.   Not seen AT
ALL.   And there are no other windows screen to hide behind!  Or are there?
And even if there were, why can't I AppActivate it on top of it/them?

 

I know the startup script is running like nothing is wrong due to its debug
logging.  The mshta script communicates back to the startup script that it
is running.  It's just invisible.

 

And yes, I've tried various parameters for the
Win32_ProcessStartup.ShowWindow setting - both 1 and 5 - neither makes any
difference, not even from the command line.

 

So, what is Win32_Process.Create not getting done that WshShell.run does
when creating a process?

 

thanks all,

Carl


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to