Sign in to follow this  
Followers 0
MrChris

Can I use FileInstall to Pack an file but not extract until I hit a button

10 posts in this topic

#1 ·  Posted (edited)

I want to pack a few files inside my compiled script but not extract them until I hit a GUI button that calls a function to extract the file.

Is this what #Include is for?

Thanks,

MrChris

Edited by MrChris

Share this post


Link to post
Share on other sites



Use something like:

While 1
    $msg = GUIGetMsg()
    If $msg = $buttonToCallRun Then
        FileInstall('C:\whatever\whatever.exe', @TempDir & '\Some.exe')
        Do
            Sleep(10)
        Until FileExists(@TempDir & '\Some.exe')
        Run(@TempDir & '\Some.exe')
    EndIf
WEnd

#include = http://www.autoitscript.com/autoit3/docs/k...rds/include.htm


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Thanks for the reply,

So it looks like it will still extract the FileInstall content to where ever I tell it to? I was only wanting to do this becuase there where a few good size files I wanted to pack inside my compiled exe and I figured if I could only have it extract those files when I hit a button in my GUI it would save some time when opening the main GUI up.

Thanks,

MrChris

Share this post


Link to post
Share on other sites

Hi, so, if I have a script that Uninstalls another program, then another script to install a new program (say, a new version of the program I just uninstalled)... I could:

FileInclude("Install.exe", @temp & "Install.exe")

And then write to the registry (HKLM...\Run\"Install.exe"

So that after the Uninstall does a reboot, the Install.exe will pick up where the previous left off and continue to Install...?

Right?

Share this post


Link to post
Share on other sites

yes, make sure you specify though where the file is in your registry key

(simply "install.exe" won't cut it :D )

Share this post


Link to post
Share on other sites

Ok yeah, ta. So if I've put the file in @temp, then the run command is (say) "C:\Temp\Install.exe".

That makes sense... :D

Share this post


Link to post
Share on other sites

Ok, one more (last...?) thing, so now that I have Uninstall.exe and Install.exe, can I make them into one .exe with AutoIt? Or should I just accept that it's gonna be two programs?

Thanks in advance...

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

You proabably want your install to create the uninstaller no?

In your install script when your installing files just have it install the unistall file also... (that sounds funny but that's what it is :D )

Edited by evilertoaster

Share this post


Link to post
Share on other sites

You proabably want your install to create the uninstaller no?

In your install script when your installing files just have it install the unistall file also... (that sounds funny but that's what it is :D )

I'm not following.

Or rather, I understand the idea (Make Phase1 (Uninstall.exe), install Phase2 (Install.exe) onto the hdd) but I don't understand how I would do that.

Do I use #install <Install.exe> ; I know that's wrong, I tried... :wacko:

Hmmm, I've just re-read your post. I think might be misunderstanding what I'm trying to do.

I have a bit of standard software (say, and antivirus of some sort) installed on a computer on a network. I have to reinstall that software and apply whatever configuration settings, patches etc. First part of the reinstall, is removing the existing application. This then requires a reboot. Upon logging into windows, the second part of the reinstall takes place - my script installs the application and configures it.

So I have an Uninstall.au3 and an Install.au3.

The Uninstall.exe places the Install.exe in a temp folder, and configures the reg\run settings.

The system reboots, and after login the Install.exe runs.

So far so good, this all seems to be working pretty well.

But, I've got TWO scripts. Can I wrap them up together so that I only have one?

Share this post


Link to post
Share on other sites

yes same method as decripbed above...have you uninstall script use FileInstall() to copy the Install.exe to your temp directory. make a new topic or pm me for more help cuz we're kidna thread hi-jacking

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