hi folks,
im trying to write a vb script to set the shell to internet explorer on windows 2000 machines. the script is supposed to replace explorer with internet explorer and should IE get closed it should either log off the user or restart IE.
heres what i have so far…
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2:Win32_Process")
errResult = objWMIService.Create("C:\Program Files\Internet Explorer\IEXPLORE.EXE", "C:\Program Files\Internet Explorer\IEXPLORE.EXE", null, intPosID)
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecNotificationQuery _
("Select * From __InstanceDeletionEvent " _
& "Within 1 Where TargetInstance ISA 'Win32_Process'")
Do Until False = True
Set objProcess = colProcesses.NextEvent
If objProcess.TargetInstance.ProcessID = intPosID Then
Exit Do
End If
Loop
can some kind person tell me what im doing wrong please?
thanks