473,394 Members | 1,702 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,394 software developers and data experts.

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.LocalMachine.CreateSubKey("Software\Micro soft\Windows\CurrentVersio
n\WindowsUpdate\Auto Update")

rk.SetValue("NoAutoUpdate", 0)

rk.SetValue("AUOptions", 4)

rk.SetValue("ScheduledInstallTime", 12)

rk.SetValue("ScheduledInstallDay", 0)

End Sub

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

try putting in double backslashes like this:

Dim Reg As RegistryKey
Dim keyValue As String

keyValue =
"Software\\Microsoft\\Windows\\CurrentVersion\\Win dowsUpdate\\Auto Update"

Reg = Registry.CurrentUser.OpenSubKey(keyValue, True)
If Reg Is Nothing Then
' Key doesn't exist; create it.
Reg = Registry.CurrentUser.CreateSubKey(keyValue)
End If

reg.SetValue("NoAutoUpdate", 0)
reg.SetValue("AUOptions", 4)
reg.SetValue("ScheduledInstallTime", 12)
reg.SetValue("ScheduledInstallDay", 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.LocalMachine.CreateSubKey("Software\Micro soft\Windows\CurrentVersio
n\WindowsUpdate\Auto Update")

rk.SetValue("NoAutoUpdate", 0)

rk.SetValue("AUOptions", 4)

rk.SetValue("ScheduledInstallTime", 12)

rk.SetValue("ScheduledInstallDay", 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.edu> wrote in message
news:uv**************@TK2MSFTNGP12.phx.gbl...
Hi Ty,

try putting in double backslashes like this:

Dim Reg As RegistryKey
Dim keyValue As String

keyValue =
"Software\\Microsoft\\Windows\\CurrentVersion\\Win dowsUpdate\\Auto Update"

Reg = Registry.CurrentUser.OpenSubKey(keyValue, True)
If Reg Is Nothing Then
' Key doesn't exist; create it.
Reg = Registry.CurrentUser.CreateSubKey(keyValue)
End If

reg.SetValue("NoAutoUpdate", 0)
reg.SetValue("AUOptions", 4)
reg.SetValue("ScheduledInstallTime", 12)
reg.SetValue("ScheduledInstallDay", 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.LocalMachine.CreateSubKey("Software\Micro soft\Windows\CurrentVersio n\WindowsUpdate\Auto Update")

rk.SetValue("NoAutoUpdate", 0)

rk.SetValue("AUOptions", 4)

rk.SetValue("ScheduledInstallTime", 12)

rk.SetValue("ScheduledInstallDay", 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
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...
7
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...
0
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...
2
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......
1
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...
2
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...
0
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
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...
1
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...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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...

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.