How to send a popup message to clients.
It may be necessary to send a pop-up message to all agent workstations. This can be done as a software distribution package.
Deploying a pop-up message
Step 1 - Create a file called DisplayMessageBoxFromFile.vbs with the following contents:
If WScript.Arguments.Count <> 1 Then MsgBox("Usage: " & Chr(13) & Chr(10) & "" & Chr(13) & Chr(10) & "DisplayMessageBoxFromFile.vbs <filename> " & Chr(13) & Chr(10) & "") WScript.Quit End If Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile(Wscript.Arguments.Item(0), 1) Do Until objFile.AtEndOfStream strCharacters = strCharacters + objFile.Read(1) 'Wscript.Echo strCharacters Loop MsgBox(strCharacters)
Step 2 - Create a simple text file called Message.txt with your message.
Make sure to log off and save data as we are sending a task that will require a reboot after 5:00 PM.
@ECHO OFF REM REM Run a command with as many parameters as are passed. REM This is used as a wrapper for an executable. REM It may also be used to alias a command. REM :getparams SET cmdparams=%1 shift :addparams SET cmdparams=%cmdparams% %1 SHIFT IF NOT %1.==. GOTO addparams :runcmd %cmdparams%
Step 3 - Put the files in the same folder in your package share.
Step 4 - Create a distribution package.
Step 5 - Make the VBscript the primary file, enter the following as the command line parameter.
Step 6 - Create a task to deploy the distribution package.
Creating future pop-up messages
From now on all you have to do is create a new text file and deploy the VBScript with it as an additional file and the file name as the parameter.