Sign in to follow this  
Followers 0
buymeapc

Write a script and compile it on the fly?

6 posts in this topic

I know it's possible, but I'm not quite sure how to do this the best way.

What I'm doing is creating a script that will add requested files, and installation files (currently batch files) to a self extracting zip file for easy deployment for my computers.

Currently, what it does is:

Takes the list of updates/files from the user via a GUI

Adds the files to a zip file

Dynamically creates an installation batch file which will run the files and also perform maintenance

Dynamically creates other "helper" files (vbs and reg) to help the installation and maintenance of the above batch

Makes the zip file self extracting via a command line call to WinZip Self-Extractor

I basically want to replace the batch file with an AutoIt file and compile it on the fly. I am aware of compiling via command line, but is this the best way of doing it?

If I am not clear in my explanation, I will try to clarify.

Thanks

Share this post


Link to post
Share on other sites



It might be worth taking a good look at "/AutoIt3ExecuteScript", search it in the help file. If your trying to compile it to replace the currently running script that would be a bit harder.


INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

If I use this option, how could I edit the secondary script on the fly to add file names and paths?

Edit

I'll attach my script so everyone can see what I'm talking about...

Process.au3

Edited by buymeapc

Share this post


Link to post
Share on other sites

If I use this option, how could I edit the secondary script on the fly to add file names and paths?

Edit

I'll attach my script so everyone can see what I'm talking about...

What you would do is have the .au3 loaded onto the users machine, and use /AutoItExecuteScript to execute that script. You can also use your original compiled script to update the script you loaded onto the users machine, that way next time /AutoItExecuteScript is called the new items are in place.

I hope this helps,

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Hmm....I'm sorry, I'm just not understanding. My compiled script is going to generate the secondary (uncompiled) script on the fly and it needs to edit/add line items into the uncompiled script. Then, the uncompiled script needs to be compiled and zipped up with the rest of the files - it doesn't need to be run until the self-extracting zip is created.

How am I going to add the line items into the uncompiled script? Would I search the au3 file for a specific keyword and the pass some FileWrite's to add the file paths and switches the user adds via the GUI?

Thanks

Share this post


Link to post
Share on other sites

The self extracting zip can call your installer script with the execute command line for the new script.

Share this post


Link to post
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
Sign in to follow this  
Followers 0