MrChris Posted July 9, 2006 Share Posted July 9, 2006 (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 July 9, 2006 by MrChris Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted July 9, 2006 Moderators Share Posted July 9, 2006 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 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. Link to comment Share on other sites More sharing options...
MrChris Posted July 9, 2006 Author Share Posted July 9, 2006 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 Link to comment Share on other sites More sharing options...
nikink Posted July 10, 2006 Share Posted July 10, 2006 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? Link to comment Share on other sites More sharing options...
evilertoaster Posted July 10, 2006 Share Posted July 10, 2006 yes, make sure you specify though where the file is in your registry key (simply "install.exe" won't cut it ) Link to comment Share on other sites More sharing options...
nikink Posted July 10, 2006 Share Posted July 10, 2006 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... Link to comment Share on other sites More sharing options...
nikink Posted July 10, 2006 Share Posted July 10, 2006 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... Link to comment Share on other sites More sharing options...
evilertoaster Posted July 10, 2006 Share Posted July 10, 2006 (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 ) Edited July 10, 2006 by evilertoaster Link to comment Share on other sites More sharing options...
nikink Posted July 10, 2006 Share Posted July 10, 2006 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 )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... 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? Link to comment Share on other sites More sharing options...
evilertoaster Posted July 10, 2006 Share Posted July 10, 2006 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now