Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 505
  • Last Modified:

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

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
*** Hopeleonie ***
Asked:
*** Hopeleonie ***
  • 3
  • 2
  • 2
  • +1
4 Solutions
 
Neil RussellTechnical Development LeadCommented:
0
 
Neil RussellTechnical Development LeadCommented:
So in your example use...

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

 
0
 
jameso99Commented:
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
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
TinTombStoneCommented:
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
 
Neil RussellTechnical Development LeadCommented:
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
 
TinTombStoneCommented:
1, 2, 3, 4, 5, 6... and relax!
0
 
*** Hopeleonie ***IT ManagerAuthor Commented:
Although all solutions are correct, i will give most of the points to Neilsr. I think it is fair...
0
 
*** Hopeleonie ***IT ManagerAuthor Commented:
Many thanks to all!
0
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.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now