Jump to content

how i use autoit scrip that i wrote?


matricks

Recommended Posts

1. Can i integrate the autoit compiled script with "nlite"? how?

2. Where i need to put the installation files of the script?

3. Where i need to put the compile(exe) script?

4. When its running? after i finish to install my Unattended xp , and when i get the desktop ?

if u can help me with 1 or more of this question .. plz write the no. of the question befor u'r answer.

thanks alot

MatrickS.

Link to comment
Share on other sites


1. Do not think you can.

2. Same directory is easiest.

3. Depends on your method of installation. GuiRunOnce is in $OEM$\$1 and RunOnceEx can be almost anywhere, with a cd letter locate function.

4. Do not understand the question.

Link to comment
Share on other sites

  • 4 weeks later...

Hi

Apologies for resurrecting an old thread but in this circumstance I think it's ok as it is very relevant...

I've created lots of scripts using AutoIT and have compiled them into exes.

Can I put these exe's along with the applications I want to install, in my 'x:\XPCD\$OEM$\$1\Install' folder?

Then, do I call each of the compiled scripts via my start.cmd ? And if so, how does it know not to start the next install until the current install has finished?

Thanks so much in advance.

I really want to get to grips with this :thumbup

Link to comment
Share on other sites

Can I put these exe's along with the applications I want to install, in my 'x:\XPCD\$OEM$\$1\Install' folder?

Yes.

Then, do I call each of the compiled scripts via my start.cmd ?
Sure. I add mine in RunOnceEX.cmd
And if so, how does it know not to start the next install until the current install has finished?

The script will remain in memory until the script is finished. As long as you are using the RunWait command in your script, to call the application install, it shouldn't move on until everything has completed.

Link to comment
Share on other sites

Nice explain Joe User 99, except for using RunWait. The vast majoity of scripts in the pinned AutoIt thread do not use RunWait as the following functions cannot interact during the installation.

Using Run and ProcessWaitClose is another option instead of using RunWait. This can allow you to insert code between these 2 functions to address issues. ProcessWaitClose is not required if good blocking functions like WinWait etc are used to control the install if it is a gui driven install.

RunWait is fine to use if no interaction is needed, like a totally silent install that AutoIt can manage. AutoIt cannot continue with the script until the RunWait process has finished.

To clarify, numerous blocking functions are available to control the flow of the script while the installation occurs. Loops could be considered also to help control script flow...

:)

Link to comment
Share on other sites

In start.cmd, wouldn't using start /wait make it pause on whatever executable file he calls?

That's what I would use in his situation. It doesn't sound like he is using a centralized script or GUI to run things, rather he has a bunch of pre-compiled AutoIt scripts for each program that can be called individually and run independantly. So he doesn't have to worry about GUI polling events or error checking being frozen (just hope that there aren't any :)). It would make more sense than daisy chaining the scripts together with embedded RunWait commands.
Link to comment
Share on other sites

In start.cmd, wouldn't using start /wait make it pause on whatever executable file he calls?

True.

As Joe User 99 is trying to mention. If the AutoIt script finishes before the installer does, then the next command in start.cmd would start. This fails the wait between installs.

To comfirm: If the Compiled AutoIt script waits for te installer to finish, then Start /Wait will perform as expected with waiting between executions.

Tip:

If alot of AutoIt scripts are being used, then an alternative can be to add AutoIt3.exe into the system path (i.e. System32 folder) and call the AU3 script as below:

Start /Wait AutoIt3.exe Path\Script.au3

Can save space, easy to edit and no compiling issues.

Edit: Added path to example.

Edited by MHz
Link to comment
Share on other sites

Nice explain Joe User 99, except for using RunWait. The vast majoity of scripts in the pinned AutoIt thread do not use RunWait as the following functions cannot interact during the installation.

LOL...yeah, didn't think about that, as none of the apps I install require any interaction. If I get one that does, I just repackage it as a MSI, then call the new MSI silently. :P

Link to comment
Share on other sites

Thank you so much for everyones input

So just to clarify, I will have some entries like this :

ECHO.
ECHO Installing Firefox 1.0.7
ECHO Please wait...
start /Wait AutoIt3.exe Firefox_1.0.7.au3

ECHO.
ECHO Installing Kaspersky Anti-Virus
ECHO Please wait...
start /Wait AutoIt3.exe KAV_5.038.au3

ECHO.
ECHO Installing Sygate Personal Firewall Pro
ECHO Please wait...
start /Wait AutoIt3.exe Sygate_PF_Pro_5.5.au3

I guess I would have to state the location of the script like :

ECHO.
ECHO Installing Sygate Personal Firewall Pro
ECHO Please wait...
start /Wait AutoIt3.exe %systemdrive%\install\Sygate_PF_Pro_5.5.au3

Edited by Mikeboy
Link to comment
Share on other sites

Au3 Advantages

No Compiler Directives used.

No Compiling needed.

Easily viewed for checking and updating.

No re-compiling needed for edits.

Save Space: 1 AutoIt3.exe + 50 scripts = 400Kb, 50 compiled scripts = 7500Kb.

Script and Installer in one location.

Hardlink friendly.

Can use a master Au3 script to execute each Au3 script in a selected folder without disturbing other executables as mentioned here.

Less headaches :)

Compiled Advantages

Easy to execute.

Security as compiled to hard to read. (Alternative: A3x in beta is encrypted script only)

Perhaps missed a few advantages?

My complete UnAttend project is AutoIt driven. I used to compile the scripts. Had a Compiler Directive to copy the compiled file to the software folder and all the other Compiler Directives to recognize exe version etc. Sometimes compiling a 2nd time, if I was not sure of compiling the 1st time. Now I do not compile and I find it as much easier to manage all the scripts. Your UnAttended project is a resource that can be updated occasionly to update as software changes etc. If your project layout is good, then you should be able to constantly improve on it. If it is easy to maintain, then it is less time consuming and more extendable.

The more Au3 scripts that you have, the better the uncompiled concept is to manage.

Edited by MHz
Link to comment
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...