Sign in to follow this  
Followers 0
DexterMorgan

Installer Thing

22 posts in this topic

#1 ·  Posted (edited)

This is an installer. I use it myself, I am not sure if you guys will need it or not. It is very simple just fill out the variables at the top and you are mostly done...

Here is the script i put in sample info...

CODE

#Region ;YOU HAVE TO CHANGE THIS TO YOUR FILES _________________ SAMPLE INFO

#AutoIt3Wrapper_Res_File_Add=file.exe

#AutoIt3Wrapper_Res_File_Add=file1.exe

#AutoIt3Wrapper_Res_File_Add=file2.exe

#AutoIt3Wrapper_Res_File_Add=file3.exe

#AutoIt3Wrapper_Res_File_Add=file4.exe

#AutoIt3Wrapper_Res_File_Add=file5.exe

#AutoIt3Wrapper_Res_File_Add=file6.exe

#AutoIt3Wrapper_Res_File_Add=file7.exe

#AutoIt3Wrapper_Res_File_Add=file8.exe

#AutoIt3Wrapper_Res_File_Add=file9.exe

#EndRegion ;CHANGE TO YOUR FILES

#include <GUIConstants.au3>

Opt("GUIoneventmode", 1)

global $change_dir

$name = "Autoit";name of your product

$info = "This program makes your life easier by scripting everyday things";info about your product (optional) {NOT TO MUCH}

$agreement = "To use this program all you need to do is" & @CRLF & " I. Do not" & @CRLF & " A. Cry";Lisense Agreement for your product (optional) - leave blank if none

;~ For the agreement use 4 spaces for a Roman Numeral and 8 for a Letter...

GUICreate("Installer Language", 243, 115)

GUISetOnEvent($GUI_EVENT_CLOSE,"_exit")

GUICtrlCreateLabel("Please select a language.", 56, 8, 126, 17)

$combo1 = GUICtrlCreateCombo("Select A Language", 32, 40, 177, 25)

GUICtrlSetData(-1, "English")

GUICtrlCreateButton("Ok", 16, 80, 97, 25, 0)

GUICtrlSetOnEvent(-1,"_language")

GUICtrlCreateButton("Cancel", 120, 80, 97, 25, 0)

GUICtrlSetOnEvent(-1, "_exit")

GUISetState(@SW_SHOW)

Func _Exit()

$Exit = MsgBox(262452,"Exit","Are You Sure You Want To Exit?")

If $Exit = 6 Then

Exit

Endif

EndFunc

Func _language()

GUISetState(@SW_Hide)

GUICreate($name & " Setup", 400, 359)

GUISetOnEvent($GUI_EVENT_CLOSE,"_exit")

GUICtrlCreateLabel("Welcome to the " &$name & " Setup Wizard", 50, 8, 294, 24)

GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")

GUICtrlCreateLabel("This wizard will guide you through the installation of", 50, 72, 244, 17)

GUICtrlCreateLabel($name & ".", 50, 88, 55, 17)

GUICtrlCreateLabel("It is recommended that you close all other applications before starting Setup. This will make it possible to update relevent system files without having to reboot your computer.", 50, 112, 300, 81)

GUICtrlCreateLabel($info, 50, 162, 278, 65)

GUICtrlCreateLabel("Click Next to continue",50, 264, 108, 17)

GUICtrlCreateButton("Cancel", 312, 320, 73, 25, 0)

GUICtrlSetOnEvent(-1, "_exit")

GUICtrlCreateButton("Next", 224, 320, 73, 25, 0)

GUICtrlSetOnEvent(-1,"_Next")

GUISetState(@SW_SHOW)

EndFunc

Func _Next()

$change_dir = FileSelectFolder("Where Would You Like To Install?", "", 1+2+4, "c\:")

if $agreement = "" then

_Download()

Else

_Agree()

EndIf

EndFunc

Func _Agree()

GUISetState(@SW_Hide)

GUICreate($name & " Setup", 497, 359)

GUISetOnEvent($GUI_EVENT_CLOSE,"_exit")

GUICtrlCreateButton("Cancel", 408, 320, 73, 25, 0)

GUICtrlSetOnEvent(-1,"_Exit")

GUICtrlCreateButton("I Accept", 320, 320, 73, 25, 0)

GUICtrlSetOnEvent(-1,"_Download")

GUICtrlCreateEdit($agreement, 0, 64, 489, 249)

GUICtrlCreateLabel(" License Agreement", -1, 8, 494, 49)

GUIctrlSetFont(8, 800, 0, "MS Sans Serif")

GUICtrlSetBkColor(-1, 0xFFFFFF)

GUICtrlCreateLabel("0", 0, -8, 494, 17)

GUICtrlSetColor(-1, 0xFFFFFF)

GUICtrlSetBkColor(-1, 0xFFFFFF)

GUICtrlCreateLabel("Please review the license terms before installing ", 40, 28, 288, 17)

GUIctrlSetFont(8, 800, 0, "MS Sans Serif")

GUICtrlSetBkColor(-1, 0xFFFFFF)

GUISetState(@SW_SHOW)

Endfunc

; This is all Sample Info ------------------------------------ Below This Line

Func _Download()

GUISetState(@SW_Hide)

GUICreate($name & " Setup", 391, 136)

GUISetOnEvent($GUI_EVENT_CLOSE,"_exit")

GUICtrlCreateLabel("Installing Autoit", 8, 8, 109, 20)

GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")

GUICtrlCreateLabel("Please wait as we install needed components to your computer.", 48, 32, 303, 17)

GUICtrlCreateButton("Cancel", 160, 96, 75, 25, 0)

GUICtrlSetOnEvent(-1,"_Exit")

$Progress1 = GUICtrlCreateProgress(16, 56, 361, 25)

GUISetState(@SW_SHOW)

DirCreate($change_dir & $name)

FileInstall("File.exe",$change_dir & $name & "/file.exe")

sleep(1000)

GUICtrlSetData($Progress1, Guictrlread($progress1) + 10)

FileInstall("File1.exe",$change_dir & $name & "/file1.exe")

sleep(1000)

GUICtrlSetData($Progress1, Guictrlread($progress1) + 10)

FileInstall("File2.exe",$change_dir & $name & "/file2.exe")

sleep(1000)

GUICtrlSetData($Progress1, Guictrlread($progress1) + 10)

FileInstall("File3.exe",$change_dir & $name & "/file3.exe")

sleep(1000)

GUICtrlSetData($Progress1, Guictrlread($progress1) + 10)

FileInstall("File4.exe",$change_dir & $name & "/file4.exe")

sleep(1000)

GUICtrlSetData($Progress1, Guictrlread($progress1) + 10)

FileInstall("File5.exe",$change_dir & $name & "/file5.exe")

sleep(1000)

GUICtrlSetData($Progress1, Guictrlread($progress1) + 10)

FileInstall("File6.exe",$change_dir & $name & "/file6.exe")

sleep(1000)

GUICtrlSetData($Progress1, Guictrlread($progress1) + 10)

FileInstall("File7.exe",$change_dir & $name & "/file7.exe")

sleep(1000)

GUICtrlSetData($Progress1, Guictrlread($progress1) + 10)

FileInstall("File8.exe",$change_dir & $name & "/file8.exe")

sleep(1000)

GUICtrlSetData($Progress1, Guictrlread($progress1) + 10)

FileInstall("File9.exe",$change_dir & $name & "/file9.exe")

regwrite("HKEY_LOCAL_MACHINE\Software\"& $name & "\", "Install_Dir", "REG_SZ", "Something")

regwrite("HKEY_LOCAL_MACHINE\Software\"& $name & "\", "Install_Dir", "REG_SZ","Something")

regwrite("HKEY_LOCAL_MACHINE\Software\"& $name & "\", "Install_Dir", "REG_SZ", "Something")

sleep(1000)

GUICtrlSetData($Progress1, Guictrlread($progress1) + 10)

Msgbox(0,"Complete",$name & " Has been installed to your Computer")

Exit

EndFunc

While 1

sleep(10)

WEnd

COMMENTS PLEASE!!!!

Edited by Konstig

code

Share this post


Link to post
Share on other sites



i think im going to make a actual installer where you can tell it what files it will make a .au3 file with all the info, and then it will compile it. I'll start working on that because my other project that i made a topic for that no one wants to help me with, i might give up so,

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Never Mind

Edited by Konstig

code

Share this post


Link to post
Share on other sites

Very Nice! 4 stars from me.. :) Thank You!

Share this post


Link to post
Share on other sites

Very helpful and well done! :)


"FREEDOM is not FREE""Its a good thing war is so terrible, or we grow too fond of it" -Robert E. Lee[quote]Firestrom: global $warming = False[/quote]My scripts:Desktop Cleaner---->Total Downloads:167;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;111111;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;;;;;;;;;;;1;;;;;;1;;;;;;;;;;;;;;11;;;;;;"a wise man once said why use your skills when we have technology"

Share this post


Link to post
Share on other sites

Needs a progress bar when installing files..

Share this post


Link to post
Share on other sites

Thanks for the feedback.

There is a Progress bar.


code

Share this post


Link to post
Share on other sites

_Download()??????????

Share this post


Link to post
Share on other sites

You are supposed to make your own func there named _download() and that is where you put File Install and stuff..


code

Share this post


Link to post
Share on other sites

Very nice :)

A minor correction though: you need to extend a little bit

$Label3 = GUICtrlCreateLabel("Please review the license terms before installing ", 40, 28, 248, 17)

because a dimension of 248 will truncate the message ("installing" will appear on the next line ... well, a couple of dots will appear) - I've changed it for 288 and it works fine.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

Very nice :)

A minor correction though: you need to extend a little bit

$Label3 = GUICtrlCreateLabel("Please review the license terms before installing ", 40, 28, 248, 17)

because a dimension of 248 will truncate the message ("installing" will appear on the next line ... well, a couple of dots will appear) - I've changed it for 288 and it works fine.

Ohh... Whoops, Thanks for telling me!

code

Share this post


Link to post
Share on other sites

really useful thx !!! :)

Share this post


Link to post
Share on other sites

WoW great :)

Share this post


Link to post
Share on other sites

Updated

Much Easier

more Features


code

Share this post


Link to post
Share on other sites

hi KonStiq,

I did something similar ages ago, and started writing a creator gui for the installer I wrote, please feel free to use any of my code, and i'll try a dig out the creator source over the next couple of days.

my attempt at an installer: http://www.autoitscript.com/forum/index.ph...c=23447&hl=


RichE

[font="'Arial Narrow';"]Current projects[/font]

[font="'Arial Narrow';"]are on my site [/font]Sellostring

Share this post


Link to post
Share on other sites

hi KonStiq,

I did something similar ages ago, and started writing a creator gui for the installer I wrote, please feel free to use any of my code, and i'll try a dig out the creator source over the next couple of days.

my attempt at an installer: http://www.autoitscript.com/forum/index.ph...c=23447&hl=

i guess i like to steal your Ideas... lol


code

Share this post


Link to post
Share on other sites

Minor updates ... Please Comment

Thank You l15ard for ideas :P


code

Share this post


Link to post
Share on other sites

Minor updates ... Please Comment

Thank You l15ard for ideas :P

No Problem, I've also found the creator source code, it is untested, and may have bugs in as i never really got around to finishing it, but as before, if there's anything in there you can use, feel free to do so.


RichE

[font="'Arial Narrow';"]Current projects[/font]

[font="'Arial Narrow';"]are on my site [/font]Sellostring

Share this post


Link to post
Share on other sites

I like it, maybe i'll make ones


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

Cool, thanks Guys...


code

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