Tripredacus Posted April 29, 2011 Share Posted April 29, 2011 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. Twitter | MSFN | VGCollect Link to comment Share on other sites More sharing options...
taietel Posted April 29, 2011 Share Posted April 29, 2011 For running hta's I use ShellExecute/Wait. Check also if the folder name where hta is has spaces. Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
Tripredacus Posted April 29, 2011 Author Share Posted April 29, 2011 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. Twitter | MSFN | VGCollect Link to comment Share on other sites More sharing options...
iamtheky Posted April 29, 2011 Share Posted April 29, 2011 (edited) should that be if processexists (Msiexec.exe)then something else to say if not processexists then processclose the htaheres 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 April 29, 2011 by iamtheky ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Tripredacus Posted May 2, 2011 Author Share Posted May 2, 2011 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... 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 WEndOS 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: Twitter | MSFN | VGCollect Link to comment Share on other sites More sharing options...
Tripredacus Posted May 3, 2011 Author Share Posted May 3, 2011 Update. This works better and seems a lot simpler! If ProcessExists ("calc.exe") Then ShellExecute ("mshta.exe", "f:\temp\splash.hta") EndIf ProcessWaitClose ("calc.exe") ProcessClose ("mshta.exe") Twitter | MSFN | VGCollect Link to comment Share on other sites More sharing options...
Carlo84 Posted May 4, 2011 Share Posted May 4, 2011 (edited) I think maybe a GUi with IE embedded could be more effective. Edited May 4, 2011 by Djarlo _SplashProgressImage | _Regionselector | _IsPressed360 | _UserAccountContol_SetLevel | _ListSubFolders Link to comment Share on other sites More sharing options...
Tripredacus Posted May 4, 2011 Author Share Posted May 4, 2011 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. Twitter | MSFN | VGCollect Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now