469,636 Members | 1,527 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,636 developers. It's quick & easy.

How to know if Windows Update is ON or OFF?

Hi

Is it possible to get information on how the settings are set in windows
thru vb.net?

best regards
/Lars Netzel
Jan 18 '06 #1
4 2601
"Lars Netzel" <ui****@adf.se> schrieb
Hi

Is it possible to get information on how the settings are set in
windows thru vb.net?

http://msdn.microsoft.com/library/en...tal_client.asp

There's a note you can add a COM reference to "WUAPI 2.0 Type Library"
(wuapi.dll).

After that you can do something like

Dim wua As New AutomaticUpdates

MsgBox(wua.ServiceEnabled)
Armin

Jan 18 '06 #2
Thank you! You know your stuff it seems

/Lars
"Armin Zingler" <az*******@freenet.de> wrote in message
news:eL**************@TK2MSFTNGP11.phx.gbl...
"Lars Netzel" <ui****@adf.se> schrieb
Hi

Is it possible to get information on how the settings are set in
windows thru vb.net?

http://msdn.microsoft.com/library/en...tal_client.asp

There's a note you can add a COM reference to "WUAPI 2.0 Type Library"
(wuapi.dll).

After that you can do something like

Dim wua As New AutomaticUpdates

MsgBox(wua.ServiceEnabled)
Armin

Jan 19 '06 #3
"Lars Netzel" <ui****@adf.se> schrieb
Thank you! You know your stuff it seems

I did not know where it was located. I have a table of content, and I use
the help "index" and "search".
Armin

Jan 19 '06 #4
"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..
Mar 3 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Paul Rubin | last post: by
3 posts views Thread by PAUL EDWARDS | last post: by
1 post views Thread by Aurimas Norkevicius | last post: by
3 posts views Thread by Brian Keating EI9FXB | last post: by
reply views Thread by rav4 | last post: by
2 posts views Thread by robert | last post: by
6 posts views Thread by Chris Marsh | last post: by
1 post views Thread by =?Utf-8?B?TXIuIFQ=?= | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.