(imported topic written by gstrawn91)
Greetings all,
I am working on a Task that would locate the DWORD value AUOptions and replace its value from “4” to “1”
After reading other forum posts, I have the following script, but it does not appear to be modify the specified value and I am at a loss as to why. The task runs to completion w/o error, just doesn’t modify.
delete __appendfile
appendfile Windows Registry Editor Version 5.00
appendfile
appendfile {("%0d%0a" & “%22AUOptions%22=%224%22%0d%0a”) of keys whose (value “AUOptions” of it = “1”) of key “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update” of native registry}
move __appendfile AUOption_fix.reg
wait regedit -s AUOption_fix.reg
if anyone can please point out where I went off-course, it would be appreciated.
Thanks
(imported comment written by SystemAdmin)
I don’t think you can convert %0d%0a, at least I haven’t been able to get it to work correctly. Have you tried testing the relevance to make sure it works fine? Relevance cannot properly convert all URL encodings.
Another thing is that your relevance is searching for AUOptions = “1”, and then will set it to “4”. Your initial requirement has it the other way around.
(imported comment written by cstoneba)
this is what I do to turn off Windows Automatic Updates:
//x86
if {not x64 of operating system}
regset "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update]" "AUOptions"=dword:00000001
regset "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update]" "AUState"=dword:00000007
endif
//x64
if {x64 of operating system}
regset "[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update]" "AUOptions"=dword:00000001
regset "[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update]" "AUState"=dword:00000007
endif