Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alerting users when Internet Explorer/Outlook is loaded

Status
Not open for further replies.

tonykblen

Programmer
Mar 25, 2003
88
IE
Hi,

Is there a way of popping up a message box that can be customised to display a warning message to users when IE is loaded up?

Can the same thing be done for Outlook?

I am aware that a message box can be displayed when logging on to the domain but I want to do this when an application is loaded.

Many thanks,

Tony.

Tony Kennedy BSc. B.I.S.,
MCSA Cand.

A good start is half the work.
Every start is difficult .
-Two Gaelic proverbs
 
Hi,
If you are still reading, yes there is. It is very easy if you use WMI to do it. Which OS are ypou using? If Win98 then you will need to download and install WMI. Otherwise, it is installed from Win ME on up.

Here's a vbs which will monitor the creation of new processes and pop a message box whenever IE or OE is started. IF you want the Office version of Outlook and not OE, then you need to substitute the name of its exe. And you will want to modify the messages too. I just left them.
Code:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colMonitoredProcesses = objWMIService. _        
    ExecNotificationQuery("select * from __instancecreationevent " _ 
        & " within 1 where TargetInstance isa 'Win32_Process'")
i = 0
Do While i = 0
    Set objLatestProcess = colMonitoredProcesses.NextEvent
   If  instr(1,objLatestProcess.TargetInstance.Name, &quot;Iexplore.exe&quot;,1) <> 0 Then
 Wscript.Echo objLatestProcess.TargetInstance.Name
ElseIF  instr(1,objLatestProcess.TargetInstance.Name, &quot;msimn.exe&quot;,1) <> 0 Then
 Wscript.Echo objLatestProcess.TargetInstance.Name
End if
Loop

 
Thanks very much Mosaic1,

My only question is where do you run the script from?

Is it the startup menu so that it executes each time on start up?

Otherwise looks great!

Cheers,

Tony.



Tony Kennedy BSc. B.I.S.,
MCSA Cand.

A good start is half the work.
Every start is difficult .
-Two Gaelic proverbs
 
Hi Tony,

You're welcome. I would. That way you are sure it runs.
In the Programs>Startup folder.

This is one of the last startup items to load.

Or add it to one of the run keys in the registry. You would have to test to see how it does in those earlier stages of bootup.

Mo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top