;Compile using http://nsis.sf.net ;Copyright 2004-2006 Bill Talcott http://www.invisibill.net SilentInstall silent CRCCheck on name "InvisiBill's ForceAU" OutFile "ForceAU.exe" Icon "ForceAU.ico" VIAddVersionKey "ProductName" "ForceAU" VIAddVersionKey "CompanyName" "invisibill.net" VIAddVersionKey "LegalCopyright" "© 2004-2006 Bill Talcott" VIAddVersionKey "FileDescription" "Force Automatic Updates on demand" VIAddVersionKey "FileVersion" "1.1.0.0" VIProductVersion "1.1.0.0" Section "DoIt" Execwait '"$SYSDIR\net.exe" stop wuauserv' WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" "AUState" "2" DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" "LastWaitTimeout" DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" "DetectionStartTime" DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" "NextDetectionTime" sleep 500 Execwait '"$SYSDIR\net.exe" start wuauserv' Execwait 'wuauclt.exe /detectnow' MessageBox MB_OK "System prepared for Windows Automatic Updates.\ $\n \ $\nIt may take up to ten minutes for Windows to begin checking for updates.\ $\nPlease do not restart the computer until the updates are installed." SectionEnd