Jump to content

[VBS] Need special MsgBox


Recommended Posts

Hi!

I've made a small Updatescript. This script will Execute all Windows-Patches

(locat in a Folder) silently and with no reboot ( /q /z ).

So you wont see anything on the monitor! But i need a Messagebox (or something

else) that advises the user, that Patches are installing at the moment.

It shouldn't have any buttons to close the Box and it should dissapear after

patchinstallation (end of script).

Can anyone help me?

thanks

Link to comment
Share on other sites


U can try this.

Save as ****.au3

Then convert to exe.

BlockInput(1)
Break(0)
Opt("ExpandEnvStrings", 1)
Opt("TrayIconHide", 1)

$message = "Installing Microsoft Hotfixes................."
SplashTextOn("TitleFoo", $message, 200, 14, -1, -1, 1, "", 8)
RunWait (@ComSpec & " /c " & "%SYSTEMDRIVE%\DIR2HOTFIX\HOTFIX1.exe /Q", "", @SW_HIDE)
RunWait (@ComSpec & " /c " & "%SYSTEMDRIVE%\DIR2HOTFIX\HOTFIX2.exe /Q", "", @SW_HIDE)
RunWait (@ComSpec & " /c " & "%SYSTEMDRIVE%\DIR2HOTFIX\HOTFIX3.exe /Q", "", @SW_HIDE)
RunWait (@ComSpec & " /c " & "%SYSTEMDRIVE%\DIR2HOTFIX\HOTFIX4.exe /Q", "", @SW_HIDE)
RunWait (@ComSpec & " /c " & "%SYSTEMDRIVE%\DIR2HOTFIX\HOTFIX5.exe /Q", "", @SW_HIDE)
SplashOff()
BlockInput(0)
Exit

Link to comment
Share on other sites

VBS messagebox example:

DoneMessage = MsgboxWithTimeout ("System will now pull the update patches in 5 minutes.",10,ScriptVer & " - SUS Updates Set",0)



Function MsgboxWithTimeout( Message, seconds, Title, Buttons )

'intButton = object.Popup(strText,nSecondsToWait,Title,Buttons)

'Button Types
 'Value Description
 '0 Show OK button.
 '1 Show OK and Cancel buttons.
 '2 Show Abort, Retry, and Ignore buttons.
 '3 Show Yes, No, and Cancel buttons.
 '4 Show Yes and No buttons.
 '5 Show Retry and Cancel buttons.

'Icon Types
 'Value Description
 '16 Show "Stop Mark" icon.
 '32 Show "Question Mark" icon.
 '48 Show "Exclamation Mark" icon.
 '64 Show "Information Mark" icon.
 '4096 System modal. On Win16 systems, all applications are suspended until
 'the user responds to the message box. On Win32 systems, this constant
 'provides an application modal message box that always remains on top
 'of any other programs you may have running.  

'The return value denotes the number of the button that the user clicked.
'If the user does not click a button before nSecondsToWait seconds, return is set to -1.
 'Value Description
 '1 OK button
 '2 Cancel button
 '3 Abort button
 '4 Retry button
 '5 Ignore button
 '6 Yes button
 '7 No button

on error resume next
Dim WshShell
set WshShell = CreateObject("WScript.Shell")

'Display the popup message with timeout
MsgboxWithTimeout = WshShell.Popup (Message, seconds, Title, Buttons)
End Function

Link to comment
Share on other sites

Hi!

I've made a small Updatescript. This script will Execute all Windows-Patches

(locat in a Folder) silently and with no reboot ( /q /z ).

So you wont see anything on the monitor! But i need a Messagebox (or something

else) that advises the user, that Patches are installing at the moment.

It shouldn't have any buttons to close the Box and it should dissapear after

patchinstallation (end of script).

Can anyone help me?

thanks

Another option is GooeyScript. Regardless of what the Woodchop site says, it is free/public domain. He states it in some places but not in others, where he hasn't updated his site.

Anyhow, it is a COM application that will allow you to render a dialog window, add labels, buttons, etc. if you want. Can capture events too.

Good luck

http://www.woodchop.com

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
  • Recently Browsing   0 members

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