Help - Search - Members - Calendar
Full Version: can some1 explain to me how to use autoit?
MSFN Forums > Unattended Windows Discussion & Support > Application Installs

   
Google Internet Forums Unattended CD/DVD Guide
kurt476
can some1 explain to me how to use auto it i don't have a clue?
dcrowder32
Not trying to be sarcastic...but have you read the help file? It is pretty good.
kurt476
nope sorry i thought some1 be better to explain to instead of reading the help
Wedge1
I am not sure if this is what the original poster meant or not, but a quick "how-to" on how make use of these scripts would be nice.
blinkdt
QUOTE
i thought some1 be better to explain to instead of reading the help

This kills me. You won't read the help file, but you WILL read someone's regurgitation of the help file? I'm beginning to understand the caustic comments of longtime forum members toward newbies, a group that I proudly claim lifetime membership.

Heck, I spent three months with AutoIt before I finally got it right, sort of. You want it in one shot? Unless you're a programmer, it's going to take some RESEARCH.

Git yer butt out from under your Xbox/Playstation and READ! realmad.gif

Sorry, had to get that off my chest. tongue.gif
kurt476
the help files don't help me as well as the ppl do they don't show you how to do the basics of writing the scripts

it is diffecly for me to write a script even if you haven't done it before i'm not that kind of programer.
lilweirddude
you could try and learn by looking at other people's scripts like me
i dont have it yet but im getting there
kurt476
May be but i don't know any thing about autoit really all i know a few dos commands what do i know of writing a windows scripts or programs
Alanoll
Well, with a combination of an example script (which with the AutiIT thread you have MANY) and the help file to look up the command, that should be all you need to do a simple script to install or run a program.
blinkdt
@kurt476

Sorry 'bout the earlier flame, but take heart. You are in exactly the right place. In fact, you sound just like me about a year and a half ago. I was where you are: I didn't know doodly-squat about shine-olaah!

Then I started to do some searching and stumbled across that whole WINNT.SIF thingy. Once I got that under my belt, I started messing with AutoIt. In fact, I did my ENTIRE post install via AutoIt scripts. Need I tell you how many hours I spent carefully making sure that every single thing was juuuust right, 'cause if it wasn't, well, then the script would fail. That's how I learned that "attention to detail" matters.

Finally, I stumbled across this forum. Been here ever since. I have learned to use RegSnap, InstallRite, nLite, ORKTools, MSI editors, Hex editors, batch files, .vbs scripts, RAID driver installs via txtsetup.sif, and the all important registry. You name it, no challenge is too great anymore. It has been a real education. And along the way I have learned about Windows: what makes it tick and stuff like that there. Tell you what, you know how during the install you can see the file names flying by? I now know what many of them are, why they are there, what they do. Wow.

As far as this forum goes, I'm a junior member stumbling along and learning like most of us. In my local community, however, I am regarded as a computer "expert." You can do this thing...one step at a time. Good luck, mi amigo. welcome.gif
MHz
A script for Free Download Mgr for example.
$title is a variable. Opt(W...) forces windows to show every 2 seconds. Blockinput stops the keyboard & mouse messing things up. Run starts execution of Free Download Mgr. Winwait waits for a particular window title with certain text, in it to appear. ControlClick directly presses the controls (buttons etc). Sleep make the script sleep. The install completes. A splash pops up to show a cleanup is in progress. FileDelete removes a shortcut. Splash finishes along with keyboard & mouse control is restored.

CODE
Dim $title = "Setup - Free Download Manager"

Sleep(2000)
Opt("WinWaitDelay", 2000)
BlockInput(1)

Run(@ScriptDir & "\Free_DM_v1.0.exe")

WinWait($title, "This will install Free Download Manager")
ControlClick($title, "This will install Free Download Manager", "TButton1")

WinWait($title, "Please read the following important information")
ControlClick($title, "Please read the following important information", "TRadioButton1")
Sleep(1000)
ControlClick($title, "Please read the following important information", "TButton2")

WinWait($title, "Setup will install Free Download Manager")
ControlClick($title, "Setup will install Free Download Manager", "TButton3")

WinWait($title, "Setup will create the program's shortcuts")
Sleep(1000)
ControlFocus($title, "Setup will create the program's shortcuts", "TEdit1")
ControlSend($title, "Setup will create the program's shortcuts", "TEdit1", "Internet\Download Manager", 1)
Sleep(2000)
ControlClick($title, "Setup will create the program's shortcuts", "TButton4")

WinWait($title, "Select the additional tasks you would like Setup")
Sleep(1000)
Send("{SPACE}{TAB 2}{SPACE}")
Sleep(1000)
ControlClick($title, "Select the additional tasks you would like Setup", "TButton4")

WinWait($title, "Setup is now ready to begin installing")
ControlClick($title, "Setup is now ready to begin installing", "TButton4")

WinWait($title, "Setup has finished installing")
Sleep(1000)
Send("{SPACE}")
Sleep(1000)
ControlClick($title, "Setup has finished installing", "TButton4")

;  -- Cleanup --

Sleep(1000)
SplashTextOn("", "Cleaning up", 130, 25, -1, -1, 1, "", 14)
Sleep(2000)

FileDelete(@ProgramsCommonDir & "\Internet\Download Manager\Free Download Manager on the Web.lnk")

BlockInput(0)
SplashOff()
Sleep(2000)
MAVERICKS CHOICE
Very nice indeed MHZ.
kurt476
@blinkdt
i must say that a qiht of store you told there
1chaoticadult
@blinkdt
I understand you feel. It didn't take me as long as you did to learn autoit (only because I've done programming and scripting before) but I'm still far from being an expert. I usually don't use autoit anymore because I like creating silent installs with Inno Setup and for everything else I use your typical batch files.

@kurt476
It takes time with autoit. Just work at it.
kurt476
i just use batch files becuase they are easy to write other then writing software i tryed that i didn't get any place on writing software really i have to have some1 teach me to write software
blinkdt
@kurt476 and drthawhizkid

kurt476, that's exactly where I started, with a simple batch that eventually became my RunOnceEx.cmd. Drthewhizkid, as RunOnceEx.cmd grew, my AutoIt post-install was steadily whittled away (Dang, I don't need AutoIt to install Acrobat Reader, I can do it THIS [much easier] way!?!) Here's what's left of my AutoIt script:
CODE
HideAutoItWin, On

;---------------------------------------------------------start

SplashTextOn, 290, 110, Installation in Progress, Preparing for Ultra install....
Sleep, 15000
SplashTextOff
Send, !{F4}
Sleep, 2000

SplashTextOn, 290, 110, Installation in Progress, Begin configuring program options....
Sleep, 2000
SplashTextOff
RunWait, %systemdrive%\\configure\\begin.cmd
RunWait, regedit /s "%systemdrive%\\Extras\\SAV8\\prefs.reg"
RunWait, regedit /s "%systemdrive%\\Extras\\Spybot\\prefs.reg"
RunWait, regedit /s "%systemdrive%\\Extras\\WMP10\\prefs.reg"
RunWait, regedit /s "%systemdrive%\\Extras\\Diskeeper\\prefs.reg"
RunWait, regedit /s "%systemdrive%\\Extras\\SymantecGhost2003\\prefs.reg"

Sleep, 2000

SplashTextOn, 360, 110, Installation in Progress, Installing Belarc Advisor system analysis tool...
Sleep, 2000
SplashTextOff
Run, %systemdrive%\\Extras\\BelarcAdvisor\\setup.exe
WinWaitActive, Belarc Advisor Installation, Welcome to the Belarc Advisor Setup program
Send, {ENTER}
;lengthy wait for slow machines
WinWaitActive, Belarc License Agreement, This is the Belarc license agreement
Send, {ENTER}
SplashTextOn, 290, 110, Installation in Progress, Preparing Belarc analysis...
Sleep, 5000
SplashTextOff
SplashTextOn, 290, 110, Installation in Progress, Please wait...30 seconds...
Sleep, 5000
SplashTextOff
SplashTextOn, 290, 110, Installation in Progress, Please wait...25 seconds...
Sleep, 5000
SplashTextOff
SplashTextOn, 290, 110, Installation in Progress, Please wait...20 seconds...
Sleep, 5000
SplashTextOff
SplashTextOn, 290, 110, Installation in Progress, Please wait...15 seconds...
Sleep, 5000
SplashTextOff
SplashTextOn, 290, 110, Installation in Progress, Please wait...10 seconds...
Sleep, 5000
SplashTextOff
SplashTextOn, 290, 110, Installation in Progress, Please wait...5 seconds...
Sleep, 5000
SplashTextOff
SplashTextOn, 290, 110, Installation in Progress, Belarc analysis OK!
Sleep, 2000
SplashTextOff
Send, !{F4}
RunWait, %systemdrive%\\configure\\BelarcIcons.cmd

Sleep, 2000

SplashTextOn, 360, 110, Installation in Progress, Installing Window Washer system cleaning tool...
Sleep, 2000
SplashTextOff
RunWait, %systemdrive%\\Extras\\WindowWasher\\setup.exe
RunWait, regedit /s "%systemdrive%\\Extras\\WindowWasher\\prefs.reg"

Sleep, 2000

SplashTextOn, 330, 110, Installation in Progress, Installing Google's Picasa image manager...
Sleep, 2000
SplashTextOff
RunWait, %systemdrive%\\Extras\\Picasa\\setup.exe
RunWait, %systemdrive%\\configure\\PicasaIcon.cmd
RunWait, regedit /s "%systemdrive%\\Extras\\Picasa\\prefs.reg"

Sleep, 2000

SplashTextOn, 360, 110, Installation in Progress, Installing CursorXP cursor theme manager...
Sleep, 2000
SplashTextOff
Run, %systemdrive%\\Extras\\CursorXP\\setup.exe
;accept license agreement
WinWaitActive, Stardock CursorXP setup
Send, {TAB 2}{SPACE}{TAB}{ENTER}
;accept default user interface language - Englisht
WinWaitActive, Stardock CursorXP setup
Send, {ENTER}
;accept default destination location
WinWaitActive, Stardock CursorXP setup
Send, {ENTER}
Sleep, 5000
;replace default cursor theme package
RunWait, %systemdrive%\\Extras\\CursorXP\\configure.cmd
Sleep, 2000
;bypass README file and configure mouse properties to activate
WinWaitActive, Stardock CursorXP setup
Send, {TAB}{SPACE}{TAB2}{ENTER}
Sleep, 6000
;close mouse properties window and move on
Send, !{F4}

;enable QuickLaunch - change taskbar spacing - remove items from system tray and more
RunWait, regedit /s "%systemdrive%\\configure\\registry.reg"
RunWait, regedit /s "%systemdrive%\\configure\\quickL.reg"
RunWait, regedit /s "%systemdrive%\\configure\\NoRun.reg"

Sleep, 2000

SplashTextOn, 330, 110, Installation in Progress, Configuring ObjectDock...
Sleep, 2000
SplashTextOff
Run, "C:\\Program Files\\Stardock\\ObjectDock\\ObjectDock.exe"
Sleep, 5000
Run, "C:\\Program Files\\Stardock\\ObjectDock\\ObjectDock.exe"
Sleep, 4000
LeftClick, 23, 430
Sleep, 500
Send, {TAB}
Sleep, 500
Send, {ENTER}

Sleep, 2000

;configure Floppy Image
Run, "C:\\Program Files\\FloppyImage\\Floppy Image.exe"
Sleep, 2000
Send, {ENTER}
Sleep, 2000
Send, !{F4}

;run batch file moving extradrivers dir to desktop
SplashTextOn, 290, 140, Installation in Progress,  Moving folders and files...
Sleep, 2000
SplashTextOff
RunWait, %systemdrive%\\configure\\move.cmd

Sleep, 1000

;cleanup ObjectDock and WindowBlinds files and Start Menu structure
SplashTextOn, 290, 140, Installation in Progress,  Please wait...
Sleep, 2000
SplashTextOff
RunWait, %systemdrive%\\configure\\end.cmd
Sleep, 2000
RunWait, %systemdrive%\\configure\\kill1.cmd
Sleep, 2000
SplashTextOn, 290, 140, Installation in Progress,  Please wait...
Sleep, 2000
SplashTextOff

;---------------------------------------------------------end game

RunWait, %systemdrive%\\configure\\kill2.cmd
Sleep, 2000

Run, %windir%\\Temp\\cleanup.exe
Sleep, 1000

Exit

[ADLIB]
Information,, Send, {ENTER}
Folder Exists,, Send, {ENTER}
Components Exist,, Send, {TAB}{ENTER}
Internet Sharing Configuration,, Send, !y
Computer Name Changes, Welcome to the, Send, {ENTER}
System Control Panel Applet, If the pagefile on volume, Send, {ENTER}
Microsoft Management Console,, Send, !c

;----------------------------------------------------------finish


What a mess, several outdated entries, written with the "old" AutoIt, but it works. It fires up several silent installs made with InstallRite, imports registry settings for several programs isntalled during RunOnceEx, runs cleanup batch files, puts a nice "Read Me NOW" Web file on the desktop, removes items from startup, yadda, yadda, yadda. Maybe I will clean it up this winter.
1chaoticadult
@blinkdt
I started with batch files then moved to autoit. I didn't know about autoit until about 3-4 months ago and was using symantec autoinstall aka AI Snapshot to silently install apps. Eventually I start using autoit but then got caught up in my so-called Inno Setup revolution. I like Inno Setup so much I want every app I have to use Inno Setup.
blinkdt
@drthawhizkid

Thanks for the tip, I've downloaded the Inno Setup program and will give it a try. Another tool in the arsenal. rolleyes.gif
1chaoticadult
@blinkdt
Glad to help out.
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.