Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for nowinupd.kix

(view source code of nowinupd.kix as plain text)

  1. ; NoWindowsUpdate.kix,  Version 1.00
  2. ; Disable Windows' Update function
  3. ;
  4. ; Usage:  KIX32 NoWindowsUpdate.kix  [ $Answer=Y ]
  5. ;
  6. ; Written by Rob van der Woude
  7. ; http://www.robvanderwoude.com
  8.  
  9.  
  10. If $Answer = ""
  11. 	? "Press Y if you want to disable Windows' Update function "
  12. 	Get $Answer
  13. EndIf
  14. If $Answer = "Y"
  15. 	$Tree = "\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"
  16. 	$Key  = "NoWindowsUpdate"
  17. 	$Val  = "00000001"
  18. 	$Type = "REG_DWORD"
  19.  
  20. 	? "Writing registry values . . ."
  21.  
  22. 	$HKTree = "HKEY_CURRENT_USER" + $Tree
  23. 	$RC = AddKey( $HKTree )
  24. 	$RC = WriteValue( $HKTree, $Key, $Val, $Type )
  25. 	$HKTree = "HKEY_LOCAL_MACHINE" + $Tree
  26. 	$RC = AddKey( $HKTree )
  27. 	$RC = WriteValue( $HKTree, $Key, $Val, $Type )
  28. EndIf
  29.  

page last modified: 2024-04-16; loaded in 0.0255 seconds