Sign in to follow this  
Followers 0
Activity

Combine Exe & Script

13 posts in this topic

Hello there :]

I'm new in the AutoIt business and it's really cool :(

Now, I have a little question:

I made a new au3 script, that I made an auto install to a software.

This script completely ready for use and advertise.

But..

How can I combine the au3 file (script) with the exe software that I just made this sciprt?

I mean, I need to click double click on the script file then the auto install running.

But how can I combine the exe and the script? which means that I don't need the software on my computer?

For exmaple:

I made a script. I want to share it. but the people who gets the script, need the software that I used for the auto install.

So, how can I "COMBINE" the .exe and the script that I can just share it without need the software?

Just double click on the file and auto install started..

Hope you understand,

thanks a lotttt to the people who will help me :graduated:

Share this post


Link to post
Share on other sites



Look in the Help file under FileInstall. From what you're talking about, this is probably your best bet.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

you mean this?

FileInstall ( "source", "dest" [, flag] )

If yes, can you please help me ?

I can't understand...

"Source" and "dest" aren't the same?

And what is flag?

Pleaseeee help me, I must it !!!

Share this post


Link to post
Share on other sites

FileInstall would bundle a file of your choosing into the script, to be included at run-time. For example:

FileInstall("C:\MyFile.exe", "C:\MyFile.exe", 1)

This will take the MyFile.exe from your machine, bundle it into your script, and then place it in the root of C:\ on the target computer. The flag (1 or 0) is whether you want the file overwritten if it already exists on the target machine.

In the example above, when I double click on the compiled script, it will copy the MyFile.exe file to my C:\, overwriting it if it already exists. This should get you on your way to what you want to do.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

First, thanks a lot about the answer :]

But I don't sure you understood me..

I want to make an exe file, that you just double click on it and the auto install is begin.

Which means that it will not extract the exe software, It will auto install it .....

I just want to double click about the install software and the script will run,

which means the auto install will run ...

I can't really explain, but take an example:

There's someone in my country forum, that made auto install.

This auto install it's just an install of BSplayer, that's how it's looks like.

But when you double click on the install, full size 16MB, the auto install is atuomatically begin.

Which means like he "hides" the script and I can't see it..

Hope you understand and pleasee help!! :graduated:

Thanks so much !!

Share this post


Link to post
Share on other sites

How can I combine the au3 file (script) with the exe software that I just made this sciprt?

I mean, I need to click double click on the script file then the auto install running.

But how can I combine the exe and the script? which means that I don't need the software on my computer?

Do you mean turn your script into a standalone exe?

If thats what you mean just use the compile to exe tool that comes with Autoit

Share this post


Link to post
Share on other sites

hehe nooo...

Ok, look:

I want to make auto install, that:

There's CCleaner install for exmaple.

you know, the install, the full 2.3MB install.

So, if you double click on it, regular install window pop up.

So, I want to make something similar:

I want to make auto install for this CCleaner for example,

Which I just need to double click on it install, the 2.3MB,

and instead of regular install, there will pop up my auto install !!!

That's what I mean !! :(

Like "COMBINE" the auto install script into the software's install.. that's all.

Hope you get it now.. :graduated:

Share this post


Link to post
Share on other sites

As JLogan3o13 pointed out, you want to use FileInstall for that.

Lets say you call your script "YourScript.Exe" and the file you want to include is "CCleanerInstall.exe"

FileInstall can be used to include CCleanerInstall.exe in YourScript.exe.

When Script.exe is run it puts CCleanerInstall.exe in a folder of choice. like @ScriptDir, or @TempDir.

The script can then run the CCleanerInstall.exe and perform the automated installation on it.

Once done CCleanerInstall.exe can be deleted.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Ohhh.. ok, thanks a lot :graduated:

But.. look, that's what I did:

$b = True

If $b = True Then FileInstall("C:\CC.exe", "@TempDir", 1)

Run ( "C:\AA.exe" )

_WinWaitActivate("Installer Language","Please select a lang")

I don't get it ..

How should the CCleaner locate in the Temp folder or any folder,

when I double click on that file I compiled?

You said:

When Script.exe is run it puts CCleanerInstall.exe in a folder of choice. like @ScriptDir, or @TempDir.

for example: I want to put the CCleanerInstall.exe in %TEMP% Folder.

how can I do that? :(

Edited by Activity

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Come on.. please help me and answer about comment 9 :graduated:

When Script.exe is run it puts CCleanerInstall.exe in a folder of choice. like @ScriptDir, or @TempDir.

for example: I want to put the CCleanerInstall.exe in %TEMP% Folder.

how can I do that?

Edited by Activity

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

FileInstall("C:\CCleaner.exe", @TempDir & "\CCleaner.exe", 1)
Global $PID = Run(@TempDir & "\CCleaner.exe")

You were using "" (quotes) around a macro so it would be installing to a drive/folder called @TempDir and not the actual %TEMP% directory. Plus why not use the Portable Version instead? It's a ZIP file that can easily be extracted with 7-Zip.

And if you don't like macros then try this...

#include <WinAPI.au3>

FileInstall("C:\CCleaner.exe", _WinAPI_ExpandEnvironmentStrings("%TEMP%") & "\CCleaner.exe", 1)
Global $PID = Run(_WinAPI_ExpandEnvironmentStrings("%TEMP%") & "\CCleaner.exe)
Edited by guinness

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

Yayyyyyyyyy it workssss!! :graduated::):(

Dude, thank you so so so so so muchh !!! :]

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