Automating software installation

6 Dec

Automating software installation

 

If you are a techie you know how annoying it is to install software over and over again on the systems you setup everyday. I always tried to find a way how to automate those tasks, so I could have time for myself while the scripts do the work. I tried many scripting programs from Windows Host script, Kixtart and many more scripting programs including full programming language packages like visual Basic and Delphi, but none of them fit my purpose.

Kixtart is a cool scripting program if you have a domain, and want to automate some basic daily tasks. The syntax is like that of Windows Host scripting. AutoIt v3 http://www.autoitscript.com/autoit3/ is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks.

AutoIT can:
Provide a general-purpose scripting language for all Windows versions
Simulate keystrokes (supports most keyboard layouts)
Simulate mouse movements and clicks
Move, resize and manipulate windows
Interact directly with “controls” on a window (set/get text from edit controls, check boxes and radio buttons, select items in drop-down lists, etc.)
Create complex user interfaces (GUIs)
Work with the clipboard to cut/paste text items
Provide a scriptable RunAs function for Windows 2000/XP/2003.

As you can see there is a lot you can do with autoit, I read on forums that there are people using it to automate keystrokes to beat some games. I use autoit at work to automate almost everything from software installation, printer setups, database moves, outlook configurations, joining computers to the domain, and all repetitive tasks I do everyday, so I’ve created scripts to make my work easier. If you haven’t play with scripting before, at the beginning it feels confusing, and it gives you that feeling that is way too complex for you, but as you get into everything becomes clearer, and you will be programming cool scripts in no time. This is one of the first scripts I wrote to automate the installation of office,
; THIS SCRIPT WILL AUTOMATE THE INSTALLATION OF OFFICE 2003
Run (“\\ the path to where we have the shared folder for software\SETUP.EXE”)
WinWaitActive (“Microsoft Office 2003 Setup”, “Product Key”)
Send (“!n”)
; this window is for the user name and password
WinWaitActive (“Microsoft Office 2003 Setup”, “User Information”)
send (“Company_name”)
send (“!n”)
; license agreements windows
WinWaitActive (“Microsoft Office 2003 Setup”, “End-User License Agreement”)
send (“{+}”)
send (“!n”)
; type of installation
WinWaitActive (“Microsoft Office 2003 Setup”, “Type of Installation”)
send (“{DOWN}”)
send (“!n”)
;Office Now is ready to begin the Installation
WinWaitActive (“Microsoft Office 2003 Setup”, “Summary”)
send (“{ENTER}”)
;Finishing Installation in Office
WinActivate (“Microsoft Office 2003 Setup”, “Setup Completed”)
send (“{ENTER}”)
And this is the software installation interface I created when I started playing with autoit *you can compile the script to run on computers that don’t have autoit installed*
Now this little interface is well elaborated with much more software options to install and I have put a banner of my company logo on the background. Like the picture below;

Download it and play with it, and if you have any question drop me a line I will be more than happy to help you to get some work done automatically.