+ Post New Thread
Page 1 of 3 123 LastLast
Results 1 to 15 of 33
Scripts Thread, popup message saying installing please wait. in Coding and Web Development; hi could anyone help me with the following problem or explain if using a script is the best way to ...
  1. #1
    tomscaper's Avatar
    Join Date
    Jul 2006
    Posts
    814
    Thank Post
    118
    Thanked 29 Times in 15 Posts
    Rep Power
    22

    popup message saying installing please wait.

    hi could anyone help me with the following problem or explain if using a script is the best way to go, or if my problem is a little to complex.

    i am currently deploying a piece of software using a batch file which runs in the group policy as a start up script. even though many times i have explained to the teachers that the software is installing and the laptop has not crashed or frozen, they still reboot the machine when it says running start up scripts message.
    as the software takes about 5 minutes to install. i am looking to create some kind of popup message that says installing please wait.

    i have looked on the internet about using msgbox and setting a timer on it.
    but i was hoping there was some way of using a vbs script to run at the begining of the batch file and start the message and once the batch file has got to a point then it will tell the script to finish and close the message.

    i know it is abit of a frivalous thing to have but it would make life a bit easier.

    hopefuly you can understand what i am asking.

    thanks
    tom

  2. #2

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,408
    Thank Post
    640
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    326

    Re: popup message saying installing please wait.

    It'd be possible to create an AutoIt script (then compile to an EXE) with a non-closable GUI (to display your message, in big writing.. ) and continually check for the presence of the installation dialog by it's window title, and only close the message once that has closed.

  3. #3
    Guest

    Re: popup message saying installing please wait.

    Could you not convert your batch file to a vbs and then have that show up a message to indicate that software is being installed, click ok to continue for example. and then the script contiunes to install software and pops up with another window at the ned saying completed click ok?

    I'm no script kiddie but use a similar method for a laptop backup routine.

  4. #4

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,592
    Thank Post
    109
    Thanked 769 Times in 598 Posts
    Rep Power
    181

    Re: popup message saying installing please wait.

    You could also package the installation so that you can deploy it via GPO... there would then be a message saying 'Installing Managed Software X'

  5. #5

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,240
    Thank Post
    1,058
    Thanked 1,068 Times in 625 Posts
    Rep Power
    740

    Re: popup message saying installing please wait.

    Agree with Webman on this - I have written tons of AutoIT Scripts and this would be straight forward to code.
    Better than knocking up a VBS script which would have about 100 lines of code to do something straight forward - the same could be done in AutoIT with around 15 to 20 lines.
    Get your batch file to call the AutoIT message box - maybe even put a BlockInput command in so the user cannot do anything with the keyboard and mouse until the install is finished.

  6. #6

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,408
    Thank Post
    640
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    326

    Re: popup message saying installing please wait.

    The script could be crafted in such a way you can specify the text and style of the message, what to wait for finishing and whether to block input (good idea!) from the command line (best method - allowing different messages depending on what you're installing for example) or an INI file.

  7. #7

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,240
    Thank Post
    1,058
    Thanked 1,068 Times in 625 Posts
    Rep Power
    740

    Re: popup message saying installing please wait.

    I've been going through some of my old AutoIT stuff and the only thing that came close to what you wanted to do was this AOE script I did quite a while ago - I've commented what may be handy for you [ plus I have removed PASSWORD details !! ]

    ; AutoIt Version: 3.10
    ; Language: English
    ; Platform: WinXP
    ; Author: Matt Marsh
    ; Script Function: Script that turns off firewall then launches Age Of Empires 2
    ; Version: 3

    SplashImageOn("resource_gui", "p:\misc\splash.jpg", "172", "168", "-1", "-1", 3)
    Sleep(2000)
    SplashOff()
    ; A splash screen which inform users whats about to happen !!
    SplashTextOn("aoe2", "Getting Ready To Launch Age Of Empires." & @CRLF & "Please Wait...", "350", "70", "-1", "-1", 3, "", "", "")
    Sleep(3000)
    ; Blocks keyboard and mouse action for a while
    BlockInput(1)
    ; Need to stop the windows firewall. Needs admin access so local admin details should do.
    RunAsSet("administrator", @ComputerName, "PASSWORD")
    Run(@ComSpec & ' /c net stop SharedAccess', '', @SW_HIDE)
    RunAsSet()
    Sleep(5000)
    ; Remove the splash screen
    SplashOff()
    BlockInput(0)
    ; Fire off the AOE prog, needed to fire it off using a batch command, I cannot remember why now.
    Run("c:\logs\empires2.cmd")
    WinWait("Age of Empires II - End User License Agreement")
    Send("{TAB 4}")
    Send("{ENTER}")
    Sleep(20000)
    ; This may be of interest to you if you are waiting for your install batch to finish running - I used this to monitor the actual
    ; AOE exe so when it closes, the firewall will start up again.
    ProcessWaitClose("empires2.exe")
    RunAsSet("administrator", @ComputerName, "PASSWORD")
    Run(@ComSpec & ' /c net start SharedAccess', '', @SW_HIDE)
    RunAsSet()
    SplashTextOn("aoe2", "Closing Down Age Of Empires." & @CRLF & "Please Wait...", "350", "70", "-1", "-1", 3, "", "", "")
    Sleep(3000)
    Exit
    Thinking about it though, I bet you could knock something up in AutoIT which will install your prog you need - it would stop any spaghetti code...

  8. #8
    tomscaper's Avatar
    Join Date
    Jul 2006
    Posts
    814
    Thank Post
    118
    Thanked 29 Times in 15 Posts
    Rep Power
    22

    Re: popup message saying installing please wait.

    Thanks for all the tips, i had tried to convert it to a vbs script but i was unable.

    As for the popup box in vbs i would use it but it needs the user to click ok and i would rather then not need to click anything as they would probably end up bugging me why is this box saying ok. lol

    i tried repackaging it to a msi but it never worked from that, they only way i have found is running at startup from a share luckily the exe can be installed silently

    this is the batch file if anyone would know how to change it to vbs.

    if exist "c:\program files\sims\installed1" goto :eof ELSE
    @echo off
    net use q: \\ast-sr-001\packages
    xcopy q:\sims\connect.ini "c:\program files\sims\" /y
    q:
    cls
    echo.********************************************* **********************************
    echo.********************************************* **********************************
    echo.**************Installing Sims Please wait for wait for*************************
    echo.***************this screen to close before continuing**************************
    echo.********************************************* **********************************
    echo.********************************************* **********************************

    q:\sims\Setups\SIMSInfrastructureSetup.exe -a {QuietMode}

    q:\sims\Setups\SIMSapplicationsetup.exe /s {QuietMode} {NoServerApps} [SIMSDirectory]="K:\SIMS\" [SIMSDotNetDirectory]="C:\Program Files\SIMS\SIMS .net"

    q:\sims\Setups\SIMSMAnualSetup.exe /s {QuietMode} {NoServerManuals} [SIMSDirectory]="K:\SIMS\" [SIMSDotNetDirectory]="C:\Program Files\SIMS\SIMS .net"

    q:\sims\Setups\SIMSAMPARKSetup.exe /s {QuietMode} {NoServerApps} [SIMSDirectory]="K:\SIMS\" [SIMSDotNetDirectory]="C:\Program Files\SIMS\SIMS .net"

    md "c:\program files\sims\installed1"

    xcopy q:\sims\connect.ini "c:\program files\sims\sims .net\" /h /y
    net use q: /d /y
    i had a go but the extra lines after the exe never worked properly

    as for the AutoIT script i have never used it and i have no idea what it is. do you need anything to run it?

    all i need the script to do is run at start saying installing.....

    then at the end somehow tell the message to close and say installation complete and close after a few seconds.

  9. #9

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,408
    Thank Post
    640
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    326

    Re: popup message saying installing please wait.

    Ok is this any good?

    Code:
    @echo off
    rem Centre window on screen and do not close after a pause
    message.exe "Please wait" "Installing Software\n\nDo NOT restart!" 0
    
    ...
    [rest of batch file]
    ...
    
    rem Close it
    taskkill /im message.exe
    
    rem Tell user its finished and close after 8 secs
    message.exe "Setup complete" "Installation complete!" 8
    message.exe <title> <message text> <pause> <xpos ypos width height>
    Attached Files Attached Files

  10. #10

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,240
    Thank Post
    1,058
    Thanked 1,068 Times in 625 Posts
    Rep Power
    740

    Re: popup message saying installing please wait.

    AutoIT is at http://www.autoitscript.com/

    Looking at your batch, you could do that very easily in AutoIT and have a better element of control as to whats happening, IE you can block the keyboard and mouse until its finished installing and show a splash or message box.
    This UN-TESTED script will pop up a message box, block keyboard and mouse, run your batch file - [ you need to change file paths etc ], monitor the window till it closes, then will pop up another box saying its finished, give keyboard and mouse back and then close.
    Like I said though - its un-tested and just written ad hoc.
    ; AutoIt Version: 3.2.0.1
    ; Language: English
    ; Platform: WinXP
    ; Author: Matt Marsh
    ; Script Function: Fires of a batch with message box
    ; Version: BETA 1
    ; Date: Jan 2007


    SplashTextOn("Sims Install","Installing Sims - please wait.","500","50","-1","-1",2,"","","")
    BlockInput(1)
    run ('Your Batch Prog Loaction\File.exe')
    ; Pauses execution of the script until the requested window does not exist. You can put a timeout setting on this if you wish
    WinWaitClose(file.exe)
    Splashoff()
    SplashTextOn("Sims Install","Installation complete","500","50","-1","-1",2,"","","")
    sleep(3000)
    BlockInput(0)
    SplashOff()
    Exit

  11. #11
    tomscaper's Avatar
    Join Date
    Jul 2006
    Posts
    814
    Thank Post
    118
    Thanked 29 Times in 15 Posts
    Rep Power
    22

    Re: popup message saying installing please wait.

    hi

    thanks that work really good, i am trying to incorporate the batch file into the autoit script, i tried running it the way you said by calling the batch file but as it is a batch file i cant work out how to tell the program to wait till it closes as the cmd prompt runs instead with the batch file inside it.

  12. #12

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,240
    Thank Post
    1,058
    Thanked 1,068 Times in 625 Posts
    Rep Power
    740

    Re: popup message saying installing please wait.

    You can use the ProcessExists function:

    If ProcessExists("notepad.exe") Then
    MsgBox(0, "Example", "Notepad is running.")
    EndIf
    Is the example from the help manaul.
    There are other Process functions too.

  13. #13
    tomscaper's Avatar
    Join Date
    Jul 2006
    Posts
    814
    Thank Post
    118
    Thanked 29 Times in 15 Posts
    Rep Power
    22

    Re: popup message saying installing please wait.

    The only part i am having trouble with is the winwaitclose part, i can get the batch file running but i cant get it to wait till the batch file has finished.

    run ('N:\My Documents\utilities\batch\sims.bat')
    ; Pauses execution of the script until the requested window does not exist. You can put a timeout setting on this if you wish
    WinWaitClose('N:\My Documents\utilities\batch\sims.bat')
    this is what i have up to now from modifying your script

  14. #14

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,240
    Thank Post
    1,058
    Thanked 1,068 Times in 625 Posts
    Rep Power
    740

    Re: popup message saying installing please wait.

    Does the sims.bat when it launches open up a window ? If so run the AU3INFO.exe to see how AutoIt is seeing the window. Check the Window Details.
    Does the Batch file close after its finished running ?
    Someone correct me if I am wrong but I think windows opens up a WOW.exe [ windows on windows session when running a CMD or Batch file ] bring up task manager and see if thats the case with your batch file. You can then use the ProcessWaitClose function on that exe [ May be worth just re-naming it to a cmd also to see if that helps ] - don't forget to change WinWaitClose though.
    I would certainly run AU3INFO first to see how its seeing the open window though...

  15. #15
    tomscaper's Avatar
    Join Date
    Jul 2006
    Posts
    814
    Thank Post
    118
    Thanked 29 Times in 15 Posts
    Rep Power
    22

    Re: popup message saying installing please wait.

    the windows detail when the bat file runs is
    Title: C:\WINDOWS\system32\cmd.exe
    Class: ConsoleWindowClass
    Size: X: 223 Y: 83 W: 669 H: 338
    i changed it to

    run ('N:\My Documents\utilities\batch\sims\sims.bat')
    ; Pauses execution of the script until the requested window does not exist. You can put a timeout setting on this if you wish
    ProcessWaitClose('C:\Windows\system32\cmd.exe')
    but it still didnt wait till it finishes i have set the batch file to pause so it is my interaction that should end it.

SHARE:
+ Post New Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 25th January 2007, 11:22 PM
  2. Display a message whilst installing software
    By richard in forum How do you do....it?
    Replies: 14
    Last Post: 14th December 2006, 01:40 PM
  3. Replies: 7
    Last Post: 27th November 2006, 11:26 AM
  4. MCSE 2003 should I wait???
    By JayR in forum General Chat
    Replies: 19
    Last Post: 21st June 2006, 08:03 AM
  5. Replies: 20
    Last Post: 30th March 2006, 02:25 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •