Hi,
I need to incorporate a message box into a vbscript. The message box would not require a response from the user. There would be no yes/no or ok to click. The message box needs to be setup in a way so that it would not stop the script from running. I would need a timer tied into the code so the message box would close at an appropriate time. Someone in another forum suggested using a HTA. The code that is pasted below was hacked together. The original idea was to create a complied exe from AutoIT and use that as a message box. As I have explained to others I don't script. So I need help piecing this together if someone is willing.
Set Fso=CreateObject("Scripting.FileSystemObject")
Set WshShell=CreateObject("WScript.Shell")
Set objNetwork=CreateObject("Wscript.Network")
objNetwork.MapNetworkDrive "b:", "\\abcwaltps\software", False, "MYDOMAIN\myuserid", "mypassword"
strComputerName=wshShell.ExpandEnvironmentStrings("%computername%")
wshshell.CurrentDirectory="b:\xpsp3\"
FSO.CopyFile "b:\xpsp3\WindowsXP-KB936929-SP3-x86-ENU.exe", "c:\windows\temp\"
FSO.CopyFile "b:\xpsp3\SplashText.exe", "c:\windows\temp\"
sTEST = "300 150 50 50 16 -1 -1"'position of window. Look at the AutoIT Documentation for specifics
sTitle = """Windows XP SP3 Installation"" "
WshShell.Run "c:\windows\temp\SplashText.exe " & stitle & """MIS Support is installing windows security updates. This message will disappear when the installation finishes in about 45 minutes. This window can be moved so it does not get in the way. Please call the Help Desk at xx-xxxx if this window is still present after 45 minutes or if you have any questions."" " & "400 170 50 50 18 -1 -1" & vbcr
wscript.sleep 2700000
wshshell.Run "c:\windows\temp\WindowsXP-KB936929-SP3-x86-ENU.exe /quiet /norestart /log:c:\windows\temp\WindowsXP-KB936929-SP3-x86-ENU.log",0,True
FSO.CopyFile "c:\windows\temp\windowsxp-kb936929-sp3-x86-enu.log", "b:\xpsp3\Logs\" & strComputerName & ".txt"
Set FSO=nothing
objNetwork.RemoveNetworkDrive "b:"
Help is greatly appreciated. Thank you.
I need to incorporate a message box into a vbscript. The message box would not require a response from the user. There would be no yes/no or ok to click. The message box needs to be setup in a way so that it would not stop the script from running. I would need a timer tied into the code so the message box would close at an appropriate time. Someone in another forum suggested using a HTA. The code that is pasted below was hacked together. The original idea was to create a complied exe from AutoIT and use that as a message box. As I have explained to others I don't script. So I need help piecing this together if someone is willing.
Set Fso=CreateObject("Scripting.FileSystemObject")
Set WshShell=CreateObject("WScript.Shell")
Set objNetwork=CreateObject("Wscript.Network")
objNetwork.MapNetworkDrive "b:", "\\abcwaltps\software", False, "MYDOMAIN\myuserid", "mypassword"
strComputerName=wshShell.ExpandEnvironmentStrings("%computername%")
wshshell.CurrentDirectory="b:\xpsp3\"
FSO.CopyFile "b:\xpsp3\WindowsXP-KB936929-SP3-x86-ENU.exe", "c:\windows\temp\"
FSO.CopyFile "b:\xpsp3\SplashText.exe", "c:\windows\temp\"
sTEST = "300 150 50 50 16 -1 -1"'position of window. Look at the AutoIT Documentation for specifics
sTitle = """Windows XP SP3 Installation"" "
WshShell.Run "c:\windows\temp\SplashText.exe " & stitle & """MIS Support is installing windows security updates. This message will disappear when the installation finishes in about 45 minutes. This window can be moved so it does not get in the way. Please call the Help Desk at xx-xxxx if this window is still present after 45 minutes or if you have any questions."" " & "400 170 50 50 18 -1 -1" & vbcr
wscript.sleep 2700000
wshshell.Run "c:\windows\temp\WindowsXP-KB936929-SP3-x86-ENU.exe /quiet /norestart /log:c:\windows\temp\WindowsXP-KB936929-SP3-x86-ENU.log",0,True
FSO.CopyFile "c:\windows\temp\windowsxp-kb936929-sp3-x86-enu.log", "b:\xpsp3\Logs\" & strComputerName & ".txt"
Set FSO=nothing
objNetwork.RemoveNetworkDrive "b:"
Help is greatly appreciated. Thank you.