Please try the following code and lets us know how it works for you.

 Code:
Break On
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('WrapAtEOL','On')

Dim $Key, $WV
If @KiX < 4.63
 ? "You are running an unsupported version of KiXtart: " + @KiX
 Exit
EndIf

$Key = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update"
If @onwow64
  $SO=SetOption('WOW64AlternateRegView','On')
EndIf

$WV = WriteValue($Key,"AUOptions",2,"REG_DWORD")

? "Registry update return error value was: " +  @ERROR + " : " + @SERROR



Configure Automatic Updates using Registry Editor
 Quote:
Registry keys for configuring Automatic Updates

Registry entries that you can use to configure Automatic Updates by using Registry Editor are located in the following subkeys:

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

HKEY_LOCAL_MACHINE\SYSTEM\Internet Communication Management\Internet Communication

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU

How to configure automatic updates by using Group Policy or registry settings