Sign in to follow this  
Followers 0
Jochanan

Convert to .exe

3 posts in this topic

Heey,

I'm completely new with this program.

I wrote a script to install a program (VLC) automaticly.

I converted the script (Au3) to exe. But then I've got the Script.exe and the program.exe(VLC).

Is it possible to make one .exe where VLC and the au3script are included?

And another question:

When VLC is installing(copying files to installdirectory) I have to wait when it's ready. After that I can click on the Finish button. I used the following:

CODE
$wait = 13000

Run("vlc-0.8.6e-win32.exe")

WinWaitActive("Installer Language")

Send("{ENTER}")

WinWaitActive("VideoLAN VLC media player 0.8.6e-installatie")

Send("{ENTER}")

WinWaitActive("VideoLAN VLC media player 0.8.6e-installatie")

Send("{ENTER}")

WinWaitActive("VideoLAN VLC media player 0.8.6e-installatie")

Opt('MouseCoordMode', 2)

MouseClick('left', 206, 198)

Send("{ENTER}")

WinWaitActive("VideoLAN VLC media player 0.8.6e-installatie")

Send("{ENTER}")

Sleep($Wait) ;time to wait when VLC is copying files to installed directory

Opt('MouseCoordMode', 2)

MouseClick('left', 182, 159)

Send("{ENTER}") ;finish button

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

$wait = 13000
Opt('MouseCoordMode', 2)
FileInstall(@ScriptDir & "vlc-0.8.6e-win32.exe", @TempDir & "vlc-0.8.6e-win32.exe")
Run(@TempDir & "vlc-0.8.6e-win32.exe")

WinWaitActive("Installer Language")
Send("{ENTER}")
WinWaitActive("VideoLAN VLC media player 0.8.6e-installatie")
Send("{ENTER}")
WinWaitActive("VideoLAN VLC media player 0.8.6e-installatie")
Send("{ENTER}")
WinWaitActive("VideoLAN VLC media player 0.8.6e-installatie")
MouseClick('left', 206, 198)
Send("{ENTER}")
WinWaitActive("VideoLAN VLC media player 0.8.6e-installatie")
Send("{ENTER}")
Sleep($Wait);time to wait when VLC is copying files to installed directory
MouseClick('left', 182, 159)
Send("{ENTER}");finish button

I added FileInstall, and you only need the Opt('MouseCoordMode', 2) once... Hope it works!

One tip though: the clickcords that you are using maybe other when you use it on another computer. Use Send("{TAB}") to change highlighted buttons, or use ControlClick()

Edit: Typo & clarification

Edited by LinuZ

Share this post


Link to post
Share on other sites

FileInstall(@ScriptDir & "vlc-0.8.6e-win32.exe", @TempDir & "vlc-0.8.6e-win32.exe")

LinuZ, no macros or variables in the 1st parmeter of FileInstall or it will fail as Aut2Exe does not know what runtime code is. And consider using "If" to check before continuing further code. Your attempt was good so please accept my comment as friendly advice. Oh, and you forgot to add backslashes after the macros.

:)

@Jochanan

Since you are using defaults for the install, then consider to use silent install switches.

RunWait('vlc-0.8.6e-win32.exe /S')

From Identify Installer within SendToA3X program based mostly on installations/scripts, general AutoIt3 stuff and general file management. If you want to do a lot of installation scripts, then I advise to try it to make like easier.

Nullsoft ® Installer (NSIS)

setup.exe /Option

(ALL SWITCHES MUST BE UPPER CASE)

Install Options
    /D=x:\dirname
        Install program to path. (NO DOUBLE QUOTES)
    /NCRC
        Skip CRC check.
Display Options
    /S
        Silent mode.
CMenu Options
    AutoIt Usage
        Create the Au3 template script.
        Edit any variables at the start of the script, and add shortcuts, that require deletion.
        Refer to the CMenu Help Guide. It displays sample highlighted items, to edit.
        Compile the script, into an exe, and keep it with the installer.
        Run the compiled exe, to install.
    Command line Usage
        To silently install, use the switch:
        Setup.exe /S

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