Jump to content

HTA as splash screen


Recommended Posts

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.

Link to comment
Share on other sites

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

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

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...