Jump to content

newbie help


wongism
 Share

Recommended Posts

I'm a newbie to autoIt and was looking for some help on 2 things and any help would be appreciated.

Objective:

To create an auto install for a program located on a network share.

Problem 1:

The setup.exe doesn't exicute

Problem 2:

Almost all of the windows have the same Title and I can't find how to make autoIt wait for the right time to exicute my choices

Code:

; IMS\21 install

EnvSet ("Server","\\\\wfsdi01\\AppInstalls")

Run ("%Server%\\Ims21\\IMS21_SETUP\\CLIENT\\SETUP.EXE")

WinWaitActive ("Ims21 Version 6.4.1 - Client - InstallShield Wizard")

Send ("!n")

; License agreement

Send ("!a")

Send ("!n")

Send ("!c")

FileChangeDir ("C:\Ims21")

Send ("!o")

Send ("!n")

; Installation

Send ("!i")

; Finish

Send ("!f")

; Clean up

FileMove ( "C:\\Documents and Settings\\%userName%\\Start Menu\\Programs\\Startup\\Ims Tcpip Server.lnk", "C:\\Documents and Settings\\All Users\\Start Menu\\Programs\\Start")

FileMove ("C:\\Documents and Settings\\%userName%\\Desktop\\PC Inquiry.lnk", "C:\\Documents and Settings\\All Users\\Desktop")

FileDelete ("C:\\Documents and Settings\\%userName%\\Desktop\\Ims Tcpip Server.lnk")

FileDelete ("C:\\Documents and Settings\\%userName%\\Desktop\\Ims Properties.lnk")

Link to comment
Share on other sites

...still working on number 2

Get more fiber in your diet. :mellow:

code:

$Server =” \\wfsdi01\AppInstalls\Ims21\IMS21_SETUP\CLIENT\SETUP.EXE”

Run ($Server)

WinWaitActive ("Ims21 Version 6.4.1 - Client - InstallShield Wizard")

Send ("!n")

Use the unique visible text available from the window, like:
$sWinTitle = "Ims21 Version 6.4.1 - Client - InstallShield Wizard"
While 1
    If WinExists($sWinTitle) Then 
        If StringInStr(WinGetText($sWinTitle), "Welcome to the client install") Then
            ControlSend($sWinTitle, "Welcome to the client install", "", "!n")
            ExitLoop
        EndIf
    EndIf
    Sleep(50)
WEnd

:(

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

WOW, what a relief, I was finally able to pass #2.....added the secondary titles.

WinWaitActive ("Ims21 Version 6.4.1 - Client - InstallShield Wizard", "License Agreement")

WinWaitActive ("Ims21 Version 6.4.1 - Client - InstallShield Wizard", "Choose Destination Location")

Thanks for your help.

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