Sign in to follow this  
Followers 0
Tripredacus

HTA as splash screen

8 posts in this topic

I am trying different ways to have a splash screen have some animation on it. My first idea was to use an animated GIF, but research shows that this is not so simple, especially since the built-in functions do not support it. So while I would like to use a Flash Projector, I tried an HTA first. However, it doesn't actually work properly due to my misuse of it being used.

While 1
    If ProcessWaitClose("msiexec.exe") Then
        RunWait (@ComSpec & " /c mshta.exe c:\folder\full.hta")
    EndIf
    Sleep(100)
WEnd

Basically, this splash is at the end of an installer. Some setup programs will launch an msiexec and then exit the setup, which will tell my program that it is finished and ready for a reboot. I had it set before to just launch ProcessWaitClose after everything was done, but it would then appear that nothing was running. Basically this will only run if msiexec.exe is running, and will wait until it closes before it goes to the next step, which is to prompt for a reboot.

Share this post


Link to post
Share on other sites



The HTA opens fine. The problem is that it opens even if msiexec is not running, and it does not close when the msiexec process exits.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

should that be if processexists (Msiexec.exe)

then something else to say if not processexists then processclose the hta

heres an example with notepad and cmd , better than my words hopefully.

Global $run

while 1

If NOT processexists ("cmd.exe") Then

If ProcessExists ("notepad.exe") Then
    $run = run ("cmd.exe")
EndIf
EndIf

If processexists ("cmd.exe") Then
    If not processexists ("notepad.exe") Then
    processclose ($run)
    sleep (50)
EndIf
Endif


Wend
Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

OK let me tell you... PARTS of this works. For example it does show the HTA while msiexec is running and DOES exit when msiexec exits... HOWEVER it doesn't just open the mshta... :unsure:

It opens over 100 of them! :>

;ProcessWait ("msiexec.exe")
While 1
    If NOT processexists ("mshta.exe") Then
        If ProcessExists ("msiexec.exe") Then
            Run (@ComSpec & " /c mshta.exe c:\folder\full.hta")
        EndIf
    EndIf
    If ProcessExists ("mshta.exe") Then
        If NOT ProcessExists ("msiexec.exe") Then
            ProcessClose ("mshta.exe")
            sleep (50)
        EndIf
    EndIf
WEnd

OS should normally have 47 processes when it is doing nothing. Instead I get 267 total, which is 220 extra processes comprising of cmd.exe, mshta.exe and conhost.exe.... Is this being caused by msiexec doing something or an error in thinking regarding the code above?

Pic:

Posted Image

Share this post


Link to post
Share on other sites

Normally yes you might be right. But I can't do anything with IE at all on the systems this program runs on. Which also means I can't open it. Yes technically I can open it but first run experiences cannot be interrupted.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0