PDA

View Full Version : Scripting?


Tech01
12-07-2007, 03:10 PM
I have a question for everyone!
I would like to know who has any scripting / programming experience? What language and type of scripting do you write?
The reason I ask is that I have a few custom written tools that I use on my 9-5 job (IT) that might make your life a little bit easier when working on Windows XP.

I currently write small apps and utilities using AUTOIT 3. If you are not familiar with AUTOIT check it out here autoitscript.com

AUTOIT ROCKS! It is fairly easy to learn and you can do things like automate the install of you favorite apps and utilities.

I will get some free sample code and post them when I get them sorted out (I have over 1 + gig of code so far).
Tech01

gunslinger
12-07-2007, 04:33 PM
Great idea Tech01, I just downloaded Autoit the other day and have only played with it for a few mins. but it looks like its going to be a must have program for me. I would love to see some of your scripts. I figured out how to make it install a program but I'm having issues selecting the options that I want ( such as when installing Ccleaner deslecting the yahoo toolbar ).

Tech01
12-14-2007, 08:27 PM
Here is a sample script that will do a silent install of Adobe Reader 8.1.

1. You need to download the Autoit3 and the SCITE Editor and install both.
2. Download Adobe Reader 8.1.
3. Create a directory for the Adobe MSI.
4. Edit the script to reflect the directory where the Adobe MSI is located.
5. Compile the script in the SCITE editor.
6. Move the compiled script to the directory that the Adobe MSI is in.
7. Execute the compiled script to install Adobe Reader.


Here is the code you need. Just copy and paste it into the SCITE editor.

;******CODE START*********
;If Not IsAdmin is used to check for Administrators Rights for the account executing the file.

If Not IsAdmin() Then
MsgBox(0, "ADMIN RIGHTS NOT DETECTED!", "YOU MUST HAVE ADMINISTRATOR RIGHTS TO INSTALL THIS SOFTWARE!")
Exit
EndIf

;If FileExists is used to check and see if the file to be executed is actually in the directory specified.
If FileExists("C:\YOUR_FOLDER\AdbeRdr810_en_US.msi") Then
SplashTextOn(@UserName, "PLEASE WAIT ADOBE READER VER 8.1 INSTALLATION IN PROGRESS!", 400, 80, 200, "", 16, "", 14, "")
RunWait('msiexec /I "C:\YOUR_FOLDER\AdbeRdr810_en_US.msi" /qn')
SplashOff()
MsgBox(0, "ADOBE READER VER 8.1 INSTALL COMPLETE!", "ADOBE READER VER 8.1 INSTALLATION IS COMPLETE!")
Else
SplashOff()
MsgBox(0, "ERROR!", "AdbeRdr810_en_US.msi NOT FOUND! PLEASE CHECK YOUR FOLDER DIRECTORY!")
EndIf


(Only works with XP Home and Pro....not tested with Vista)!