Jump to content


Photo

Using AutoIt for silent install


  • Please log in to reply
62 replies to this topic

#1 ricktendo

ricktendo

    Group: Banned

  • Global Mods
  • 8,712 posts
  • Location:La Ceiba
  • OS:Windows 8 x64

Posted 02 August 2007 - 04:34 PM

hi all , i am making this little guide to help making autoit scripts , to avoid the troubles of finding switches and so on .....
==============================================
here we go .....
=============================================

-----------------------
what is an Autoit Script
------------------------
it is a simple script , made to do jobs automatically , u write down the script (the script is mainly a robot that will tell the system what to do ) , then compile it , the resulting exe will do what u specifed in the code each time the program runs,
----------------------------
What is the relation between Auto it and silent install:
---------------------------
simply , u wil make the installation go smoothly , without ur interaction , the script u make will do the job ..... u may see examples in this topic :
http://www.msfn.org/board/index.php?showtopic=20197

---------------------
OHH dear , shall i write scripts and think of coding
----------------------
Answer is , NO , u will see in this guide , how will we make scripts for silent installs without writing code.
------------------------
Why and when shall i use autoit for silent install ?
------------------------
when u don't find the silent switch u need , u are pushed to use the autoit method ..


==============NOW LET US GOOO!!!!================
firstly we need the program ,,, get it here
http://www.autoitscript.com/cgi-bin/getfil...it-v3-setup.exe
and we need the Scite tool , to use the script recorder::

Scite
---------
http://www.autoitscript.com/cgi-bin/getfil...iTe4AutoIt3.exe
install both programs ,,,
now go to :
Start >>programs>>autoit V3>>scite>>Script Writer
u will see this :

Attached File  scritptw.PNG   18.55KB   967 downloads

1- select the installation package which u r going to make the script for , it shall be an EXE which the script will call each time it runs ..........
2- make the check boxes , as made in the pic
3- click the "A" button

once we click the "A" button,the exe(which is the installation package) we specifed will run, and every movement we make on our pc using the keyboard will be recorded,
During the record of this code , Take care of :

1-Avoid Alt+tab, or navigating to othr windows
2- use " Alt+N" to choose "next" ، Alt+y to choose " Yes" , and so on ..
3- u may use the Tab button to navigate between buttons

After u completly installed the application , we have to stop the record operation by clicking the "A" button at the upper left of the screen , now u must see some code written like this ....

Attached File  daemonsc.PNG   24.68KB   841 downloads

Now , we have to add little code to our app , to avoid hassles , and running same application again and again

-------------------------------------
$SF_1 = "app.exe"

If WinExists ( $SF_1 ) Then Exit
AutoItWinSetTitle ( $SF_1)

---------------------------------------
** u may ask , what is this attented for , the answer is , this code is just a safety measure during the testing period , i once used a script which don't have this code (or similiar) and a big trouble occourded , the compiled EXE kept running it self again and again , and at last , 101 process where running on my poor pc :no: , i used taskkill to
get rid of those processes and i succeded :thumbup
---------------------------------
replace app.exe by the installation package exe u selected when recording the script, now save the file near by ur EXE package as u see in the pic , then compile the script ....

Attached File  compile.PNG   175.17KB   572 downloads

NOW all is done we have the compiled EXE , try running it now , u will see every thing in the setup going automatically
without ur interaction , once u test and find every thing working good , u may make a RARsfx which will have the compiled EXE to run after the extraction process

I found this useful when I cant find any silent switches for my installers :thumb_yello:

#2 Helmi

Helmi

    DriverPacks.net Team member

  • Members
  • PipPipPipPip
  • 123 posts
  • OS:Windows 7

Posted 02 August 2007 - 04:52 PM

The pics aren't showing up, unfortunately...
(I'd like to use this!)

#3 ricktendo

ricktendo

    Group: Banned

  • Global Mods
  • 8,712 posts
  • Location:La Ceiba
  • OS:Windows 8 x64

Posted 02 August 2007 - 05:49 PM

I think I got it correct

#4 xms3500

xms3500

    Member

  • Members
  • PipPip
  • 13 posts
  • OS:non-selected

Posted 23 September 2007 - 01:23 PM

A great tutorial ricktendo64, but I'm having a little bit of trouble, when Autoit is recording the install at the end
it has finish that you would normally click, I have tried Alt+F with no luck but if I hit Enter, the program
box disappears, but when I compile the script and run the .exe autoit created, everything goes well until the end, the
program dialog box doesn't close.

I was wondering have you got any ideas??

#5 dkrus

dkrus

    Member

  • Members
  • PipPip
  • 34 posts
  • OS:Windows XP Pro

Posted 05 December 2007 - 05:59 PM

Is there a guide for making the RARsfx ? So it installs automatically when I click it without having to hit install button?

#6 ricktendo

ricktendo

    Group: Banned

  • Global Mods
  • 8,712 posts
  • Location:La Ceiba
  • OS:Windows 8 x64

Posted 05 December 2007 - 07:18 PM

Is there a guide for making the RARsfx ? So it installs automatically when I click it without having to hit install button?

In the advanced SFX options there is a setting

Posted Image

Run your installer silently add the switch

Posted Image

Or you can add it manually like this in the comment section

;The comment below contains SFX script commands

Setup=Program.exe /S
Silent=1
Overwrite=1
Edit: You may wanna check extract to temp folder also

#7 dkrus

dkrus

    Member

  • Members
  • PipPip
  • 34 posts
  • OS:Windows XP Pro

Posted 05 December 2007 - 09:48 PM

cool thanks Rick, just tried it worked perfect

Edited by dkrus, 05 December 2007 - 09:58 PM.


#8 legnireb

legnireb

    Lurker

  • Members
  • Pip
  • 6 posts
  • OS:Windows XP Pro

Posted 09 January 2008 - 02:42 PM

Hi ricktendo64

Very Good Guide.

I made a silent install of irfanview410 as a Test and everything go right, by following this excellent guide.

But now i have a problem i dont know how to resolve, and i ask for your help...
I compiled the au3 file to "exe" file.
How do i now make a cab file from this "exe" file to put in nlite addons?

Can anyone help please?

I'm new in those things...


Thanks in advanced...Sorry about my poor english...

#9 Kelsenellenelvian

Kelsenellenelvian

    Master of my domain!

  • Global Mods
  • 3,093 posts
  • Location:U.S.A.
  • OS:Windows 7 x64

Posted 09 January 2008 - 03:22 PM

http://www.wincert.n...?showtopic=2356

#10 legnireb

legnireb

    Lurker

  • Members
  • Pip
  • 6 posts
  • OS:Windows XP Pro

Posted 09 January 2008 - 06:56 PM

hi Kelsenellenelvian!

Thanks for your help...
Just only more one question...
when i finished instaling the programm Irfarview410.exe and i recorded with Autoit ScriptWritter last window terminated with a "Finish".
Ok, after instalation, If i want to copy a dll file to the instalation folder of the aplication how did i proceed in the au3 file?

can you help...


ths...

#11 Kelsenellenelvian

Kelsenellenelvian

    Master of my domain!

  • Global Mods
  • 3,093 posts
  • Location:U.S.A.
  • OS:Windows 7 x64

Posted 09 January 2008 - 07:30 PM

ummmm I really don't know auto-it much m8.

#12 legnireb

legnireb

    Lurker

  • Members
  • Pip
  • 6 posts
  • OS:Windows XP Pro

Posted 10 January 2008 - 01:52 PM

hi Kelsenellenelvian!

I made a silent install for iview410.exe.
I added it to nlite addons, hotfixes etc.
Made iso file
And run Virtual Pc 2004.

But the program was not installed.
What can be wrong?
Can you help...I send the addon to be analised...

Here is the ini:
[general]
BuildDate = 7 Janeiro de 2008
Description = IView 4.10
Language = English
Title = Irfan View 4.10
Version = 4.10
Website =

[EditFile]
I386\SVCPACK.INF,SetupHotfixesToRun,AddProgram

[AddProgram]
Irfan.exe /S

And here the script:

Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
$SF_1 = "iview410_setup.exe"

If WinExists ( $SF_1 ) Then Exit
AutoItWinSetTitle ( $SF_1)

Run('E:\incoming\nlite_guide\irfan\iview410_setup.exe')
WinWait("IrfanView Setup","Create IrfanView sho")
If Not WinActive("IrfanView Setup","Create IrfanView sho") Then WinActivate("IrfanView Setup","Create IrfanView sho")
WinWaitActive("IrfanView Setup","Create IrfanView sho")
Send("{ALTDOWN}n{ALTUP}")
WinWait("IrfanView Setup","What's new in this v")
If Not WinActive("IrfanView Setup","What's new in this v") Then WinActivate("IrfanView Setup","What's new in this v")
WinWaitActive("IrfanView Setup","What's new in this v")
Send("{ALTDOWN}n{ALTUP}")
WinWait("IrfanView Setup","Do you want to assoc")
If Not WinActive("IrfanView Setup","Do you want to assoc") Then WinActivate("IrfanView Setup","Do you want to assoc")
WinWaitActive("IrfanView Setup","Do you want to assoc")
Send("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ALTDOWN}n{ALTUP}")
WinWait("IrfanView Setup","* Instantly find you")
If Not WinActive("IrfanView Setup","* Instantly find you") Then WinActivate("IrfanView Setup","* Instantly find you")
WinWaitActive("IrfanView Setup","* Instantly find you")
Send("{SHIFTDOWN}{SPACE}{SHIFTUP}{TAB}{SHIFTDOWN}{SPACE}{SHIFTUP}{TAB}{TAB}{ALTDO
WN}n{ALTUP}")
WinWait("IrfanView Setup","Press the ""Next"" but")
If Not WinActive("IrfanView Setup","Press the ""Next"" but") Then WinActivate("IrfanView Setup","Press the ""Next"" but")
WinWaitActive("IrfanView Setup","Press the ""Next"" but")
Send("{ALTDOWN}n{ALTUP}")
WinWait("IrfanView Setup","Open IrfanView &FAQs")
If Not WinActive("IrfanView Setup","Open IrfanView &FAQs") Then WinActivate("IrfanView Setup","Open IrfanView &FAQs")
WinWaitActive("IrfanView Setup","Open IrfanView &FAQs")
Send("{SHIFTDOWN}{SPACE}{SHIFTUP}{ALTDOWN}d{ALTUP}")
WinWait("IrfanView Frequently Asked Questions - Windows Internet Explorer","Favorites Command Ba")
If Not WinActive("IrfanView Frequently Asked Questions - Windows Internet Explorer","Favorites Command Ba") Then WinActivate("IrfanView Frequently Asked Questions - Windows Internet Explorer","Favorites Command Ba")
WinWaitActive("IrfanView Frequently Asked Questions - Windows Internet Explorer","Favorites Command Ba")
Send("{ALTDOWN}{F4}{ALTUP}")



Thanks for your help...

#13 Sm0k3r

Sm0k3r

    WinCert Friend

  • Members
  • PipPipPipPip
  • 153 posts
  • Location:Runcorn, Cheshire
  • OS:Windows 7

Posted 10 January 2008 - 04:00 PM

Change this
Run('E:\incoming\nlite_guide\irfan\iview410_setup.exe')

to this
Run('iview410_setup.exe')


#14 legnireb

legnireb

    Lurker

  • Members
  • Pip
  • 6 posts
  • OS:Windows XP Pro

Posted 10 January 2008 - 05:54 PM

HI Sm0k3r!
thanks for your help...
Another problem i had ..is that i also add RVMUPDATEPACK2.1.11.7z in nlite addons and
Programaddons_Adobe_Reader_8.1.1.cab.

Only adobe 8.1.1 succeed to instal.
RVMUPDATEPACK did'nt succeed...

I don't Know why not...

Can you give me a help...

ths...

#15 Kelsenellenelvian

Kelsenellenelvian

    Master of my domain!

  • Global Mods
  • 3,093 posts
  • Location:U.S.A.
  • OS:Windows 7 x64

Posted 11 January 2008 - 03:32 AM

How do you know it didn't install? Its not supposed to have a glaring banner or anything...

#16 legnireb

legnireb

    Lurker

  • Members
  • Pip
  • 6 posts
  • OS:Windows XP Pro

Posted 11 January 2008 - 01:40 PM

hi Kelsenellenelvian!

I think it not installed because i went to windows folder and i thought the updates were there...
i did not see anything there...
perhaps i made a confusion...

if it is normal how do we know that run ok?

where can we go to see that them were installed ok?



sorry about this but i am realy confused...

#17 chaox2

chaox2

    Member

  • Members
  • PipPip
  • 38 posts
  • Location:www.kaskus.us
  • OS:Windows XP Pro

Posted 15 January 2008 - 11:16 AM

HI Sm0k3r!
thanks for your help...
Another problem i had ..is that i also add RVMUPDATEPACK2.1.11.7z in nlite addons and
Programaddons_Adobe_Reader_8.1.1.cab.

Only adobe 8.1.1 succeed to instal.
RVMUPDATEPACK did'nt succeed...

I don't Know why not...

Can you give me a help...

ths...


RVMUPDATEPACK2.1.11.7z isn't nlite addons, you must use RVM integrator to add it.

after integrate RVMUPDATEPACK2.1.11.7z to your windows directory, you can use nlite to add programs, then make an iso

Edited by chaox2, 15 January 2008 - 11:18 AM.


#18 legnireb

legnireb

    Lurker

  • Members
  • Pip
  • 6 posts
  • OS:Windows XP Pro

Posted 21 January 2008 - 02:04 PM

hi everybody..

Can anyone tell me where i can download Universal silent switch installer?



Ths in advance...

#19 Yza_K

Yza_K

    Member

  • Members
  • PipPip
  • 36 posts
  • OS:Windows XP Pro

Posted 19 March 2008 - 08:35 AM

Maybe if u wanna look the last source...
Autoit Ita Source.

#20 Kelsenellenelvian

Kelsenellenelvian

    Master of my domain!

  • Global Mods
  • 3,093 posts
  • Location:U.S.A.
  • OS:Windows 7 x64

Posted 19 March 2008 - 10:08 AM

http://www.wpiw.net/downloads/ussf.exe




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users