Jump to content

Recommended Posts

Posted

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

Posted

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

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!

Posted

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

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
Posted

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

Posted

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

Posted

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!"

Posted

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!"

Posted

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

Posted

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!"

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
  • Recently Browsing   0 members

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