How to enable a application upgraded message popup window , when the users logon into their PCs


We use Windows 2012 AD and client as XP and windows 7 .I am going to do a software upgrade on our servers. After this upgrade  I want to communicate this  to all users through a popup window when they login into their PC on the next day. When they click OK on the message popup window , the window must disappear

I want to create a vbs script and call through the logon process.

I copied the following on a notepad and changed the file extension to .vbs and , when I double click , it throws with error

MsgBox("Application Server Upgraded")

Please note the server X application was updated on 30/12/13.Please run the X application  from the: Start -All Programs and please do not open any application while the PCs are getting udated.

Please post me the VBS syntax

Many Thanks
Who is Participating?

Improve company productivity with a Business Account.Sign Up

mcsweenConnect With a Mentor Sr. Network AdministratorCommented:
To call the script from another script you will have to use the wshell object.
Dim wShell

Set wShell = CreateObject("")

wShell.Run "WScript.exe  \\Server-001\NETLOGON\AppUpgrade.vbs"

Open in new window

Or you can just copy the script to the end of your app-upgrade script.  Just don't copy the option explicit line (this must be the first line of any script if used).
mcsweenConnect With a Mentor Sr. Network AdministratorCommented:
Enter the following code; Replace the section "Put your message here", do not remove the quotes.  Save to a file with a .vbs extension and setup as a login script.

option explicit

dim strMsg

strmsg = "Put Your Message Here"

msgbox strmsg

Open in new window

lianne143Author Commented:
Will I be able to put a Title Message  above the message. if so please post a  syntax for this.

Many thanks
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

mcsweenConnect With a Mentor Sr. Network AdministratorCommented:
Option explicit

dim strMsg, strTitle
strTitle = "Put Your Title Here"
strMsg = "Put Your Message Here"

MsgBox strMsg,vbOKOnly,strTitle

Open in new window

lianne143Author Commented:

I copied the above code to a text file and renamed it as AppUpgrade.VBS and when I execute on the desktop it successfully works.

I copied the AppUpgrade.VBS file to the following path. This where the Staff Login script.VBS resides


Then: I opened the StaffLogin.vbs and added the following line to this vbs script, so that it would call the: AppUpgrade.vbs , during the logon process.

Wscript \\Server-001\NETLOGON\AppUpgrade.vbs

When I login into any PC,  during the logon process I am getting the following error instead of the Popping the upgrade window to the users.

Windows Script Host

Error:Syntax error
Source::Microsoft VBscript Compilation error

Any help much appreciated!
lianne143Author Commented:
Hi Mcsween

That worked like a charm :)

Thanks you so much for your help!
mcsweenConnect With a Mentor Sr. Network AdministratorCommented:
Please don't forget to award points.  Thanks!
lianne143Author Commented:
Will I be able to alert you in my future posts.
Many thanks and your points awarded :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.