Solved

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

Posted on 2011-03-21
8
458 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 ***
  • 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

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…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 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