Tuesday, March 29, 2011

AutoIT Example 1. Windows Update Automation

Code:

If @Username <> "Administrator" Then
RunAsSet("Administrator",@ComputerName,"password")
    install()
    RunAsSet()
  Else
    install()
  EndIf

Func install()
    RunWait("Windows Update 1.exe /passive /norestart")
    RunWait("Windows Update 2.exe /passive /norestart")
EndFunc

No comments:

Post a Comment