Jump to content

include executable in compiled script


switch
 Share

Recommended Posts

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 :)

Link to comment
Share on other sites

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
Link to comment
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. :)

Link to comment
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!"

Link to comment
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!"

Link to comment
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!"

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...