I have created small .vbs script for listing all services and
services status, but this script doesn`t work on Win NT.
(On Win2K and WinXP is running OK).
script:
Dim objComputer, clsService
Set objComputer=GetObject("WinNT://domain/computer,computer")
objComputer.Filter=Array("service")
For Each clsService in objComputer
Wscript.Echo clsService.Name & " status: " & clsService.Status
Next
I hope that anyone can help me with this.
Regards,
Matej
none of the Internet Explorer events are working, can you show me how to do
this correctly, thank you!
Set ie = WScript.CreateObject("InternetExplorer.Application", "ie_")
ie.Navigate "http://www.google.com"
ie.Visible = 1
ie.Left = 0
ie.Top = 0
ie.Height = 600
ie.Width = 800
ie.ToolBar = 1
ie.StatusBar = 1
ie.Resizable = 1
ie.StatusBar = 1
Private Sub ie_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If (pDisp Is ie.Object) Then
MsgBox "your document is ready"
End If
End Sub
Private Sub ie_Stop()
MsgBox "IE has stopped"
End Sub
Private Sub ie_Quit()
MsgBox "User has quit"
End Sub
Private Sub ie_Refresh()
MsgBox "Your document has refreshed"
End Sub
-------------------
Also tried adding
WScript.ConnectObject ie,"ie_"
yet that gives an error.
Regards,
Greg Woolley
Multiposting vs Crossposting
http://www.blakjak.demon.co.uk/mul_crss.htm
--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter
Hi
You need to install ADSI (DSClient) on your NT 4.0 computer:
http://www.microsoft.com/windows2000/server/evaluation/news/bulletins/adextension.asp
Thanks for Resolution. ;)
Hello,
Now It`s working, but is there any other way to list services,
because I want to use this script as part of MSI package and if
end-user does not have installed DSClient installation would fail.
(so I need something else to check SQL service) Is there any other
way?
Regards,
Matej
> "Torgeir Bakken (MVP)" <Torgeir.B...@hydro.com> wrote in message news:<3E6A99D5...@hydro.com>...
>
> Hello,
> Now It`s working, but is there any other way to list services,
> because I want to use this script as part of MSI package and if
> end-user does not have installed DSClient installation would fail.
> (so I need something else to check SQL service) Is there any other
> way?
Hi
On a NT 4 computer, if you need to just check if the service is existing and not disabled (not caring if the
service is running or stopped), something like this can be used:
Set oShell = CreateObject("WScript.Shell")
On Error Resume Next
iValue = oShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Services\Messenger\Start")
On Error Goto 0
If iValue = 2 Or iValue = 3 Then
WScript.Echo "The Messenger service exists and is not disabled"
End If
If Start is 2, the service is set to Automatic, if it is 3, it is set to Manual.
Thanks, I`ll try.