Jump to content

Creating Updating Scripts similar to Ninite Updater

Recommended Posts

Hello Everyone,

I'd like to start by saying I'm new to AutoIt. While I do have a computer programming background it's most recent knowledge is only dealing with web which I wouldn't consider computer programming. With that said I've been given the task here at work to develop an updating script for our off site computers. I'm not sure if AutoIt can do what I'm looking to get done, but it looked very promising. Here's a basic breakdown of what we are looking to accomplish:

  • Automate application updates similar to ninite updater that can be preformed remotely.
  • This must be down via an administrator Logon and scheduled for night time via ip address.
  • Phase 1 of applications will be: Adobe Reader, Adobe Flash, Adobe Shockwave, Java, and Windows Updates.
  • Phase 2 will include having a report generated on machines that were successful and failed.
  • Phase 3 will include having this report gather information about Norton Anti-Virus, Spybot S&D, CCleaner, Defraggler, such as error logs and other issues.
I'm looking for any suggestions on where I can find help in developing this configuration. Thank you in advance for everyone that is able to help. Thanks.


IT Support Specialist

Jack Williams Tire Co, Inc.

Link to post
Share on other sites

Joe, since software companies change download locations and file names with new verisons, it would be impossible to grab new software from a website by a hard-coded link. I suggest using your company's website (if you have one) to create a folder and place software installers in it. Below is a script that would download software from your predetermined storage folder and install it as an admin. It can also write a log file saying whether the installation was successful. There are also email functions around that you could use to email results to yourself (not included below). Finally, you could schedule the exe to run with Task Scheduler.

#include <File.au3>
$tempDir = @TempDir & "\" & @YEAR & @MON & @MDAY & "-SoftwareDownload"

; Read registry for highest version of Adobe Reader that is installed
For $i = 1 To 10
    Local $var = RegEnumKey("HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader", $i)
    If @error <> 0 Then ExitLoop
    $adobeReaderRegVersion = $var

; Read the path to where Adobe Reader is installed and read what version number is currently installed
$adobeReaderInstallPath = RegRead("HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\" & $adobeReaderRegVersion & "\InstallPath", "")
$adobeReaderFileVersion = FileGetVersion($adobeReaderInstallPath & "\AcroRd32.exe")

; Grab installer from your predetermined location
$file1 = InetGet ("http://www.yourcompanywebsite.com/Software_Downloads/Adobe_Reader.exe", $tempDir & "\Adobe_Reader.exe", 1)

; Install files as admin
RunAs("administrator", @ComputerName, "password", 1, $tempDir & "\Adobe_Reader.exe")

; Get the updated file version
$adobeReaderUpdatedFileVersion = FileGetVersion($adobeReaderInstallPath & "\AcroRd32.exe")

; Write to log
If $adobeReaderUpdatedFileVersion > $adobeReaderFileVersion Then
    _FileWriteLog($tempDir & "\log.txt", "Success: Adobe Reader upgraded from " & $adobeReaderInstalledVersion & " To " & $adobeReaderUpdatedFileVersion)
ElseIf $adobeReaderFileVersion <= $adobeReaderUpdatedFileVersion Then
    _FileWriteLog($tempDir & "\log.txt", "Failure: Adobe Reader did not upgrade successfully")

; Repeat above steps for other software
Link to post
Share on other sites

Our company uses WPKG to distribute software packages across all of our offices. You can setup software distribution and installation automatically overnight. You can find a lot of already-made scripts for WPKG for the installation/update/uninstallation processes of most popular software packages.


“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...