Solved

How can i include my company name to a message box from a vbscript ?

Posted on 2011-03-21
8
490 Views
Last Modified: 2012-05-11
Hi

How can i include my company name to a message box from a vbscript ?

Here is my script:
set s=getobject("winmgmts:root\cimv2")
sQuery="select * from win32_process where name='iexplore.exe'"
set q=s.execquery(sQuery)

If q.Count > 0 Then 
msgbox "Maintenance: Close Internet Explorer bla bla bla."
 
Do until q.count=0
    wscript.sleep 5000
    set q=s.execquery(sQuery)
    msgbox "still open please close..."
Loop
msgbox "Internet Explorer closed, thanks. Starting to update, have a nice day!"

Set WshShell = WScript.CreateObject("Wscript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
 
end if

Open in new window


I would like to have my Message box like this (below). Is it possible ?

 example
0
Comment
Question by:*** Hopeleonie ***
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 37

Assisted Solution

by:Neil Russell
Neil Russell earned 450 total points
ID: 35183988
0
 
LVL 37

Accepted Solution

by:
Neil Russell earned 450 total points
ID: 35183992
So in your example use...

msgbox "Maintenance: Close Internet Explorer bla bla bla." , 0, "My Company Name"

 
0
 
LVL 6

Assisted Solution

by:jameso99
jameso99 earned 25 total points
ID: 35183998
Change the line where you call the message box here:

Dim strMbox
strMbox = "."

strMbox = MsgBox("Here is the text",0,"Title")

Open in new window


For different kinds of message box values check this out:
http://msdn.microsoft.com/en-us/library/139z2azd(v=vs.80).aspx
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 6

Assisted Solution

by:TinTombStone
TinTombStone earned 25 total points
ID: 35184520
MsgBox "Maintenance: Close Internet Explorer bla bla bla.",,"Your Comany Name Here"

MsgBox "Internet Explorer closed, thanks. Starting to update, have a nice day!",,"Your Comany Name Here"

General sytax:

MsgBox Prompt, [Buttons]. [Title], [HelpFile], [Context]
0
 
LVL 37

Expert Comment

by:Neil Russell
ID: 35192443
Why, when I have already answered a question correctly with ALL the information needed, do people insist on posting additional posts with EXACTLY the same information and nothing additional?
0
 
LVL 6

Expert Comment

by:TinTombStone
ID: 35192539
1, 2, 3, 4, 5, 6... and relax!
0
 
LVL 19

Author Comment

by:*** Hopeleonie ***
ID: 35223404
Although all solutions are correct, i will give most of the points to Neilsr. I think it is fair...
0
 
LVL 19

Author Closing Comment

by:*** Hopeleonie ***
ID: 35223408
Many thanks to all!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question