"Armin Zingler" <az*******@freenet.de> wrote in message
news:eL**************@TK2MSFTNGP11.phx.gbl...
After that you can do something like
Dim wua As New AutomaticUpdates
MsgBox(wua.ServiceEnabled)
Armin
Hey! That's kinda neat <g> A VB6 version.....
'=====
Private Sub Command1_Click()
Dim oWinUpdate As AutomaticUpdates
Dim oSettings As IAutomaticUpdatesSettings
Set oWinUpdate = New AutomaticUpdates
Set oSettings = oWinUpdate.Settings
Select Case oSettings.NotificationLevel
Case aunlDisabled
Debug.Print "NotificationLevel: Disabled"
Case aunlNotConfigured
Debug.Print "NotificationLevel: Not Configured"
Case aunlNotifyBeforeDownload
Debug.Print "NotificationLevel: Notify Before Download"
Case aunlNotifyBeforeInstallation
Debug.Print "NotificationLevel: Notify Before Installation"
Case aunlScheduledInstallation
Debug.Print "NotificationLevel: Scheduled Installation"
End Select
End Sub
'=====
There seems to be all kinds of goodies hidden in that DLL. I may incorporate
something like this into my next project. We build factory automation
machines and use "run of the mill" PCs for computers. The first thing that
happens when we ship to a customer is.... they install their corporate virus
scanner (which bloats the system and may cause major problems) and enable
Windows Update. No matter how many times we tell them that "this is not to
be confused with a desktop PC", once it's in their hands, we lose all
control. Both AV and WU absolutely >can not run and must be completely
disabled< (no screen savers either) while we're controlling servo's, etc.
--
Ken Halter - MS-MVP-VB (visiting from VB6 world) -
http://www.vbsight.com
Please keep all discussions in the groups..