473,485 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2827
"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
2293
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
2397
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
1757
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
7358
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
1288
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
891
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
2290
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
595
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
7852
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I prompt a "Save As" dialog for an accepted mime type?...
1
1611
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
7090
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,...
1
6825
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
5418
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4857
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4551
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3058
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3063
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1376
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
595
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.