Jump to content

Running scripts through an installer


jben
 Share

Recommended Posts

hey everyone.

Just a quick one. Is it possible to run autoIT scripts through an installer. I basically have some scripts that automate software installation, I am currently implementing this in Visual basic but just wondering if it would be possible/easyier to run scripts through an installer.

Not sure if this is possible and what installer I would require if so?.

any ideas?, thanks

Link to comment
Share on other sites

I suppose you could create your custom-made installer. Create a script that will later be compiled and use FileInstall() to include the installer and the script to automate this installer. For example:

;Install both exe's in your installer script:
FileInstall("C:\installer.exe",@ScriptDir & "\Installer.exe")
FileInstall("C:\AutoScript.exe",@ScriptDir & "\AutoScript.exe")

;run the AutoScript.exe:
Run(@ScriptDir & "\AutoScript.exe")

You should have 3 exe's then. Your installer (which contains your script and the installer to automate), the script and the installer. Once you compile your installer you'll only have one exe. But this exe will install the other two at the same dir...

Ok. that was confusing. Sorry.

Edited by Nahuel
Link to comment
Share on other sites

I know what your saying but what I mean is actually using an installer (like PDW or install shield).

Then having the installer run the .exe script and install the software. Really not sure about this.

As it stands I just run the scripts in visual basic when a user clicks a button. The scripts then run and a progressbar shows the user how far the installation has got overall. So the progressbar will increment by 30 after each script exe finishes.

3 scripts = increment 90

and thenthe max value of the progress bar is 90, hence after the 3rd script completes the installation is finished.

I have used modules, shellandwait and plenty of other stuff. But have started to think that this might be overkill as i'm literally creating the installer myself. I do find by using Visual basic as the front end is quite good though, as it provides a simple front end with buttons that can call the scripts and wait for each one to finish before proceeding to the next and then recording progress.

The whole installation will probably consist of 5 scripts, and all the installation will be automated via AutoIT. I just believe having a progress bar is a nice touch though as atleast if a user wants to watch the installation, he/she has an indication of how far it has got.

Edited by jben
Link to comment
Share on other sites

hey everyone.

Just a quick one. Is it possible to run autoIT scripts through an installer. I basically have some scripts that automate software installation, I am currently implementing this in Visual basic but just wondering if it would be possible/easyier to run scripts through an installer.

Not sure if this is possible and what installer I would require if so?.

any ideas?, thanks

Most installer types could do what you maybe asking.

Try using Inno Setup and use ISTool (ISTool is a very good frontend to Inno Setup). Then look at ISTool for the "Install Run" section. Or perhaps if you have the scripts compiled to run the individual setups, then keep them external so they are not compiled into 1 executable setup file. Depending on your layout, you could use Inno Setup to extract to the temp folder, execute your AutoIt scripts and then cleanup the temp folder of the extracted files. Many ways and the best depends on the need.

:)

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...