Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-03-21
8
Medium Priority
?
495 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 1800 total points
ID: 35183988
0
 
LVL 37

Accepted Solution

by:
Neil Russell earned 1800 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 100 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 100 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

Industry Leaders: 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

Welcome, welcome!  If you are new to the series and haven't been following along, please take a brief moment to review the first three installments: Part 1 (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/A_266-VBScri…
This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

722 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