473,396 Members | 1,780 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 2823
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Paul Rubin | last post by:
As what must be penance for something or other, I'm needing to release a Python app for use under Windows XP. Please be gentle with me since I'm a Un*x weenie and the only thing I've had much...
3
by: PAUL EDWARDS | last post by:
I have a windows form that is bound to a datatable. In VB6 I could just update the field contents and it would be updated in the database, however if I update the text property of the control from...
1
by: Aurimas Norkevicius | last post by:
How to create application whitch acts like the one on the windows update page. I created windows forms control whitch uses ActiveX object. I want to host that control on the web page. Every...
3
by: Brian Keating EI9FXB | last post by:
Hello again, I've already placed a few posts on this topic. This time i've a simple application that exhibits my problem, I've placed sample solution 8k on my website should anyone be interested...
0
by: q8z | last post by:
private OleDbDataAdapter daClient; private OleDbDataAdapter daAdd; private OleDbDataAdapter daDelete; private string dataSource; private DataSet dataSet; private System.Windows.Forms.Button...
0
by: rav4 | last post by:
I did every thing offered in this newsgroup but still again when I update my windows I find the Windows genuine Advantage Validation fails to update. I have a Genuine Windows product as verified my...
2
by: robert | last post by:
I've trouble compiling win32all. VC98 and latest SDK installed (otherwise with original SDK it won't even compile). It tells that uuid.lib(cguid_i.obj) : fatal error LNK1103: debug info is...
6
by: Chris Marsh | last post by:
All I have a database table, changes to the data within which I am interested in acting on. The approach that I'm taking is to have the database update a file every time data is updated. This...
60
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I prompt a "Save As" dialog for an accepted mime type?...
1
by: =?Utf-8?B?TXIuIFQ=?= | last post by:
When I power down for the day, I am presented with a notice that an update is in progress and to not turn off power manually (it will occur automatically). The screen remains and the text flashes,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.