472,353 Members | 1,263 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 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 2998
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...
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...
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...
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...
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....
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...
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...
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...
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...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.