473,545 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting Automatic Updates via the registry in XP/2000.

Below is a set of insructions that changes the registry keys pertaining to
Automatic Updates on my Windows XP box.

I can make changes using the control panel applet and see the changes
reflected via regedit.exe. However when I make the changes with the code
below those changed are NOT reflected in the control panel applet even
though they are actully being set.

Does anyone have any experience with this?

Thanks again!

Imports Microsoft.Win32

Module Module1

Sub Main()

Dim rk As RegistryKey =
Registry.LocalM achine.CreateSu bKey("Software\ Microsoft\Windo ws\CurrentVersi o
n\WindowsUpdate \Auto Update")

rk.SetValue("No AutoUpdate", 0)

rk.SetValue("AU Options", 4)

rk.SetValue("Sc heduledInstallT ime", 12)

rk.SetValue("Sc heduledInstallD ay", 0)

End Sub

End Module
Nov 20 '05 #1
2 3081
Hi Ty,

try putting in double backslashes like this:

Dim Reg As RegistryKey
Dim keyValue As String

keyValue =
"Software\\Micr osoft\\Windows\ \CurrentVersion \\WindowsUpdate \\Auto Update"

Reg = Registry.Curren tUser.OpenSubKe y(keyValue, True)
If Reg Is Nothing Then
' Key doesn't exist; create it.
Reg = Registry.Curren tUser.CreateSub Key(keyValue)
End If

reg.SetValue("N oAutoUpdate", 0)
reg.SetValue("A UOptions", 4)
reg.SetValue("S cheduledInstall Time", 12)
reg.SetValue("S cheduledInstall Day", 0)

****You might have to reboot the machine to load the changed registry so
that the changes are reflected in the control panel applet***

Good Luck!

Shawn Shelton

Ty Moffett wrote:
Below is a set of insructions that changes the registry keys pertaining to
Automatic Updates on my Windows XP box.

I can make changes using the control panel applet and see the changes
reflected via regedit.exe. However when I make the changes with the code
below those changed are NOT reflected in the control panel applet even
though they are actully being set.

Does anyone have any experience with this?

Thanks again!

Imports Microsoft.Win32

Module Module1

Sub Main()

Dim rk As RegistryKey =
Registry.LocalM achine.CreateSu bKey("Software\ Microsoft\Windo ws\CurrentVersi o
n\WindowsUpdate \Auto Update")

rk.SetValue("No AutoUpdate", 0)

rk.SetValue("AU Options", 4)

rk.SetValue("Sc heduledInstallT ime", 12)

rk.SetValue("Sc heduledInstallD ay", 0)

End Sub

End Module


Nov 20 '05 #2
It's always the small stuff. After a reboot the control panel showed the
right information.

Thanks Shawn. =)

"Shawn D Shelton" <sh******@isu.e du> wrote in message
news:uv******** ******@TK2MSFTN GP12.phx.gbl...
Hi Ty,

try putting in double backslashes like this:

Dim Reg As RegistryKey
Dim keyValue As String

keyValue =
"Software\\Micr osoft\\Windows\ \CurrentVersion \\WindowsUpdate \\Auto Update"

Reg = Registry.Curren tUser.OpenSubKe y(keyValue, True)
If Reg Is Nothing Then
' Key doesn't exist; create it.
Reg = Registry.Curren tUser.CreateSub Key(keyValue)
End If

reg.SetValue("N oAutoUpdate", 0)
reg.SetValue("A UOptions", 4)
reg.SetValue("S cheduledInstall Time", 12)
reg.SetValue("S cheduledInstall Day", 0)

****You might have to reboot the machine to load the changed registry so
that the changes are reflected in the control panel applet***

Good Luck!

Shawn Shelton

Ty Moffett wrote:
Below is a set of insructions that changes the registry keys pertaining to Automatic Updates on my Windows XP box.

I can make changes using the control panel applet and see the changes
reflected via regedit.exe. However when I make the changes with the code below those changed are NOT reflected in the control panel applet even
though they are actully being set.

Does anyone have any experience with this?

Thanks again!

Imports Microsoft.Win32

Module Module1

Sub Main()

Dim rk As RegistryKey =
Registry.LocalM achine.CreateSu bKey("Software\ Microsoft\Windo ws\CurrentVersi o n\WindowsUpdate \Auto Update")

rk.SetValue("No AutoUpdate", 0)

rk.SetValue("AU Options", 4)

rk.SetValue("Sc heduledInstallT ime", 12)

rk.SetValue("Sc heduledInstallD ay", 0)

End Sub

End Module

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2961
by: William Ryan | last post by:
Are you using an intranet or the internet to push the updates? If the internet, you probably can't get there without a web server. If you are using an intranet, you can do it from a shared folder. Paul Kimmel has a new book http://www.amazon.com/exec/obidos/ASIN/0672324075/internco m-20/002-4611773-6304806 that discusses this in depth......
7
1367
by: James Thomas | last post by:
Hello - I have a web application done in ASP .NET and SQL Server that tracks certain things for users. Currently, they must log on to be notified when the items they have stored are getting ready to expire. Some have asked if they could be sent emails such that they are automatically notified via email when their information is getting...
0
1175
by: =?Utf-8?B?VG9kZA==?= | last post by:
I need to be able to set Windows "Automatic Updates" to "Download updates for me, but let me choose when to install them" on my clients computers programmatically. If someone could point me in the right direction I would appreciate it. -- Thanks, Todd Manchester Chronicle Technologies Inc
2
1437
by: DamianWarS | last post by:
im writing a automated batch script in windows 2000 and i want to set automatic caching on a folder after i apply shares to it using rtmshare.exe. i have done it before but i can't remember how... is there something in the reskit to help me out or some command im missing?
1
1596
by: =?Utf-8?B?RUVL?= | last post by:
I cannot enable my Automatic Updates. Whenever I enable it, it goes directly to disable. I hve a Windows security Alert constantly in my tool bar. When I click on that, I can't even switch Updates from off to on. Am I infected? I am not an expert with computers, so please help. Thanks.
2
1504
by: raaman rai | last post by:
I have turned up Automatic Updates in my system in it daily updates and ask for restart after successful installation. Today again my system was restarted on its own after the updates but surprisingly i was greeted with the logon screen. Infact i have no password assigned for my system and i have only one system account created when i installed...
0
853
by: =?Utf-8?B?amFu?= | last post by:
iv'e tried everything to get my updates on but can't error message keeps saying code 0X8DDD0018 iv'e tried list of services bits ,log report and updates, but nothing please help
0
1121
by: raaman rai | last post by:
This is quite irratiting to find out that my system is enabled with automatic updates and it periodically updates my pc with the latest updates. But recently i encountered network problem once the updates get installed. Then i had to restore my system and it worked but again the updates were left to run as usual. And again i got the same problem...
1
1266
by: childers | last post by:
Hi All, I am new with SQL server, current my company is running SQL Server 2000 and will move the database to SQL 2005. Once I move the database over to SQL Server 2005, is there a way for me to compare the setting of the locking mechanism, such as optimistic and pessimistic, I want to make sure they will be identical. Or is it all in the...
0
7478
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7410
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7668
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7773
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5984
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4960
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1901
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 we have to send another system
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.