Help me, please!
Paul.
> Hello.
> I need to enumerate installed component W2k (Add/remove
> programm->Add/remove Windows component)
I am not aware of any way to do this...
> and sheduled task.
Take a look at this thread:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=u5%23zXwAlDHA.2416%40TK2MSFTNGP10.phx.gbl
jt.exe is also an option:
Microsoft Task Scheduler Command Line Utility.
http://www.jsiinc.com/subf/tip2600/rh2621.htm
Generate a CSV file of scheduled tasks and their credentials.
http://www.jsiinc.com/SUBL/tip5700/rh5712.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
To find the components listed in Add/Remove windows component, you may read
the entries in following registry entry:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
Best regards,
Luke
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
"MSFT" <luke...@online.microsoft.com> wrote in message
news:ZPwVgxys...@cpmsftngxa07.phx.gbl...
When get Windows components list, it will query multiple place, there is no
a concentrated registry or file to store such a list.
But I found this single place:
Software\Microsoft\Windows\CurrentVersion\Setup\OC Manager\Subcomponents
This sample:
'------------------------------
On Error Resume Next
Const HKEY_LOCAL_MACHINE = &H80000002
PC = "localhost"
'Get name of target computer
If Wscript.Arguments.Count >=1 Then
If Not IsEmpty(Wscript.Arguments(0)) Then
PC = Wscript.Arguments(0)
End if
End If
Set WMI = GetObject("winmgmts:\\" & PC & "\root\cimv2")
OsComponent1 = ARRAY("Certificate Services CA", "Certificate Services Web
Enrollment Support", _
"Cluster Services", "Indexing Service", "FTP Publishing Service",
"FrontPage 2000 Server Extensions", _
"NNTP Service", "Simple Mail Transport Protocol (SMTP)", "World Wide Web
Publishing Service", "Connection Manager Components", _
"Network Monitor Tools", "SNMP service", "Message Queuing Services", _
"DNS Server", "DHCP Server", "Internet Authentication Service", _
"QoS Admission Control Service", "Simple TCP/IP Service", _
"Site Server Internet Location Service", "Wins Server", "Remote
Installation Services", _
"Remote Storage", "Script Debugger", "Terminal Services", "Terminal
Services Licensing", _
"Windows Media Services", "Windows Media Services Admin")
OsComponent2 = ARRAY("certsrv_cerver", "certsrv_client", _
"cluster", "indexsrv_system", "iis_ftp", "fp_extensions", _
"iis_nntp", "iis_smtp", "iis_www", "netcm", _
"netmontools", "snmp", "msmq", _
"dns", "dhcpserver", "ias", _
"acs", "simptcp", _
"ils", "wins", "reminst", _
"rstorage", "iisdbg", "tsenable", "licenseserver", _
"wms_server", "wms_admin")
OsComponent3 = ARRAY("certsvc", "", _
"ClusSvc", "cisvc", "msftpsvc", "", _
"nntpsvc", "smtpsvc", "w3svc", "netman", _
"", "snmp", "msmq", _
"dns", "dhcpserver", "", _
"rsvp", "simptcp", _
"", "wins", "", _
"", "", "termservice", "TermServLicensing", _
"wmserver", "")
RegKey = "Software\Microsoft\Windows\CurrentVersion\Setup\OC
Manager\Subcomponents"
Set Registry = GetObject("winmgmts:" & _
"{impersonationLevel=Impersonate}!\\" & _
PC & "\root\default:StdRegProv")
Registry.EnumValues HKEY_LOCAL_MACHINE, RegKey, KeySet
Srvc = Null
For Each Key In KeySet
Registry.GetDWORDValue HKEY_LOCAL_MACHINE, RegKey, Key, KeyValue
If KeyValue = 1 Then
For i=0 To UBound(OsComponent2)
If Key=OsComponent2(i) Then
Wscript.Echo "<branch id='os-componet'>"
Wscript.Echo "<property id='os-componet-name'>"
Wscript.Echo OsComponent1(i)
Wscript.Echo "</property>"
If OsComponent3(i)<>"" Then
Set Srvc = Wmi.Get("Win32_Service.Name=" & "'" & OsComponent3(i) & "'")
Wscript.Echo "<property id='os-component-startmode'>"
Wscript.Echo Srvc.StartMode
Wscript.Echo "</property>"
End if
Wscript.Echo "</branch>"
Srvc = Null
Exit for
End If
Next
End If
Next
Srvc = Null
Key = Null
KeySet = Null
Registry = Null
Thank you for the share. The regsitry entry is created by Optional
Component Manager in windows during setup.