Sign in to follow this  
Followers 0
Gmaster123

Need help in scripting for an application

5 posts in this topic

#1 ·  Posted (edited)

Hello guys,

I hope some one can help me with this issue. Actually I am new to this Autoitscript tool and need a help. I have to script for an application using the below scenarios.

Scenario1- Installing the application.

Let say I have an Exe file (ex: Google Web Accelerator)

Using this Autoit tool i need to install that exe file in my PC

Scenario2- Uninstalling the application

Same as the above, as I need to uninstall the application using this tool by scripting.

The problem is that the application file is in "Msi" extention When I try to use the Run command to launch that application, I am getting an error saying unable to execute the external programcan some one plese suggest how to launch the file which is in "MSI" Extention. At least if you have some sample script it would be great. I can manage with that.

Your comments will be more appreciable

Thanks in advance

Edited by Gmaster123

Share this post


Link to post
Share on other sites



Hi,

maybe you can come up with :

#include <Process.au3>
;#NoTrayIcon
Run(@ComSpec & " /c " & "c:\Downloads\TheMSIFile.msi" , "", @SW_HIDE)

Hope the helps, although your post is very old. :lmao:

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Hi,

maybe you can come up with :

#include <Process.au3>
;#NoTrayIcon
Run(@ComSpec & " /c " & "c:\Downloads\TheMSIFile.msi" , "", @SW_HIDE)

Hope the helps, although your post is very old. :lmao:

So long,

Mega

Hmmh, also found that

http://www.autoitscript.com/forum/index.php?showtopic=20674

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Hello guys,

I hope some one can help me with this issue. Actually I am new to this Autoitscript tool and need a help. I have to script for an application using the below scenarios.

Scenario1- Installing the application.

Let say I have an Exe file (ex: Google Web Accelerator)

Using this Autoit tool i need to install that exe file in my PC

Scenario2- Uninstalling the application

Same as the above, as I need to uninstall the application using this tool by scripting.

The problem is that the application file is in "Msi" extention When I try to use the Run command to launch that application, I am getting an error saying unable to execute the external programcan some one plese suggest how to launch the file which is in "MSI" Extention. At least if you have some sample script it would be great. I can manage with that.

Your comments will be more appreciable

i dont thinc msi extension is accepted but you can try say:

run("somethinc.bat")

and bat file :

start "your file"

Thanks in advance

Share this post


Link to post
Share on other sites

You can automate the install by running the MSI like below:

Run('msiexec /i "path to your msi\file.msi"')

Then I would recommend a loop with WinExists that can handle either Install or UnInstall.

Here is a working proof of concept using BootVis v1.3.37

$msi = 'BootVis v1.3.37.msi'
$pid = Run('msiexec /i "' & @ScriptDir & '\' & $msi & '"')
$title = 'Microsoft Bootvis'

Do
    Select
        Case WinExists($title, 'Re&move Microsoft Bootvis')
            ControlCommand($title, 'Re&move Microsoft Bootvis', 'Button4', 'Check')
            ControlClick($title, 'Re&move Microsoft Bootvis', 'Button1')
        Case WinExists($title, 'Welcome to the Microsoft Bootvis Setup')
            ControlClick($title, 'Welcome to the Microsoft Bootvis Setup', 'Button1')
        Case WinExists($title, 'License Agreement')
            ControlClick($title, 'License Agreement', 'Button3')
            ControlClick($title, 'License Agreement', 'Button6')
        Case WinExists($title, 'Select Installation Folder')
            ControlClick($title, 'Select Installation Folder', 'Button1')
        Case WinExists($title, 'Confirm Installation')
            ControlClick($title, 'Confirm Installation', 'Button1')
        Case WinExists($title, 'Installation Complete')
            ControlClick($title, 'Installation Complete', 'Button1')
        Case Else
            Sleep(250)
    EndSelect
    Sleep(100)
Until Not ProcessExists($pid)

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