Solved

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

Posted on 2011-03-21
8
482 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
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!

 
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

I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

751 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