Sign in to follow this  
Followers 0
switch

include executable in compiled script

17 posts in this topic

Sorry for noob question, I've installed AutoIT about 3 hours ago and what I'm trying to figure out is to include an executable into the compiled script, cause I want to have only one unattended setup exe. I've tried it like this, but it will cause an error..

#Include <vista_inspirat.exe>
#NoTrayIcon

Opt ( "WinWaitDelay" , 300 );
Opt ( "WinTitleMatchMode" , 4 );
Opt ( "WinDetectHiddenText" , 1 );

;RunSetup
Run ( "vista_inspirat.exe" );

....

Exit

What am I doin' wrong? Any help will be highly appreciated.

P.S.: Sorry for my english :)

Share this post


Link to post
Share on other sites



Search the Autoit3 Helpfile for "FileInstall". It should be exactly what you need :)

Share this post


Link to post
Share on other sites

#Include "vista_inspirat.exe";MUST BE in the same place as the script for it too work

Try that!

Share this post


Link to post
Share on other sites

#Include "vista_inspirat.exe";MUST BE in the same place as the script for it too work

Try that!

It is in the same directory. maybe I'm a beginner, but I'm not dumb :)

Share this post


Link to post
Share on other sites

Swift is dead wrong.

Look in the helpfile for FileInstall like I said. It's perfect for your uses :)

Share this post


Link to post
Share on other sites

Swift is dead wrong.

Look in the helpfile for FileInstall like I said. It's perfect for your uses :)

What What WHat?????!?!?!?!

How am I wrong? I am right!

Share this post


Link to post
Share on other sites

Are you serious Swift?

Share this post


Link to post
Share on other sites

Are you serious Swift?

Are you serious Justin?

Im Serious.

You can include .exe's...I think.. O.o? :)

Share this post


Link to post
Share on other sites

Search the Autoit3 Helpfile for "FileInstall". It should be exactly what you need :)

FileInstall ("vista_inspirat.exe" , "%windir%\Temp\" );

Run ( "%windir%\Temp\vista_inspirat.exe" );

Did I get it? :)

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

FileInstall(@ScriptDir & "\vista_inspirat.exe", @TempDir & "\vista_inspirat.exe"); <---Gotta put the filename of what your installing :)

then...

Run(@TempDir & "\vista_inspirat.exe"); <----then run it at the TempDir where you installed it.

Basically...Just a few mistakes

Edited by Swift

Share this post


Link to post
Share on other sites

FileInstall(@ScriptDir & "\vista_inspirat.exe", @TempDir & "\vista_inspirat.exe")

then...

Run(@TempDir & "\vista_inspirat.exe")

Basically...Just a few mistakes

thanks a lot guys for your patience with a noob like me. such kindness is very rare this time. :)

Share this post


Link to post
Share on other sites

thanks a lot guys for your patience with a noob like me. such kindness is very rare this time. :)

I wouldnt say that...when im around :) :)

Share this post


Link to post
Share on other sites

I wouldnt say that...when im around :) :)

Use a bit of caution here.

That fileInstall could fail.

From the help file

Source The source path of the file to compile. This must be a literal string; it cannot be a variable.

@ScriptDir could cause it to fail.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

whoops.. "Invalid FileInstall() function:" at compilation...

You have to set the full path to the source. Sometimes you can get away with using just the filename for the source but that often won't work either.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Use a bit of caution here.

That fileInstall could fail.

From the help file

@ScriptDir could cause it to fail.

Exactly. Compilation will end prematurely with an error.

FileInstall ( "vista_inspirat.exe" , @TempDir & "vista_inspirat.exe" );

Run ( @TempDir & "vista_inspirat.exe" );

This seems to be the solution.

Thanks a lot, everybody :)

Share this post


Link to post
Share on other sites

Last question - I swear :) how to SILENTLY run the compiled exe? Tried all usual switches, but any of them won't work. Thx.

Share this post


Link to post
Share on other sites

Last question - I swear :) how to SILENTLY run the compiled exe? Tried all usual switches, but any of them won't work. Thx.

That depends on what installer was used to create the package.

Did you try

/s

/q

/silent

/qn

/v"/qn"


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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