Jump to content

Application deployment


Recommended Posts

Hi,

I don't know if this forum is still alive as the dates I see are really old but I'm going to try here.

I need to deploy an old application with SCCM on Windows 7 that requires many Next / Next clicks that cannot be done silently.

I've tried creating an AutoIT script but I'm really not an AutoIT expert.

The script compiled as exe works well when started from a command prompt in the user's session but it doesn't work when launched by SCCM using the SYSTEM profile.

Here's the script I've created :

Run("setup.exe","C:\Tools\SpeechMagic6\WsSetup\French")
WinWait("Avertissement")
ControlSend("Avertissement", "", "", "{ENTER}")
WinWait("InstallShield Wizard")
ControlSend("InstallShield Wizard", "", "", "{ENTER}")
WinWait("InstallShield Wizard", "Base de données Oracle")
ControlSend("InstallShield Wizard", "Base de données Oracle", "", "{ENTER}")
WinWait("InstallShield Wizard", "Connexion administrateur")
ControlSend("InstallShield Wizard", "Connexion administrateur", "", "{ENTER}")
WinWait("InstallShield Wizard", "Informations sur le poste de travail")
ControlSend("InstallShield Wizard", "Informations sur le poste de travail", "", "{ENTER}")
WinWait("InstallShield Wizard", "Options SpeechMagic dans le menu Démarrer")
ControlSend("InstallShield Wizard", "Options SpeechMagic dans le menu Démarrer", "", "!t")
ControlSend("InstallShield Wizard", "Options SpeechMagic dans le menu Démarrer", "", "!s")
WinWait("InstallShield Wizard", "Composants de SpeechMagic")
ControlSend("InstallShield Wizard", "Composants de SpeechMagic", "", "!t")
ControlSend("InstallShield Wizard", "Composants de SpeechMagic", "", "!s")
WinWait("InstallShield Wizard", "Périphériques de contrôle")
ControlSend("InstallShield Wizard", "Périphériques de contrôle", "", "!m")
ControlSend("InstallShield Wizard", "Périphériques de contrôle", "", "!s")
WinWait("InstallShield Wizard", "Dossier de destination")
ControlSend("InstallShield Wizard", "Dossier de destination", "", "!s")
WinWait("InstallShield Wizard", "Dossier programme")
ControlSend("InstallShield Wizard", "Dossier programme", "", "!s")
WinWait("InstallShield Wizard", "Configuration du service SpeechMagic")
ControlSend("InstallShield Wizard", "Configuration du service SpeechMagic", "", "!n")
ControlSend("InstallShield Wizard", "Configuration du service SpeechMagic", "", "xxx\xxx")
ControlSend("InstallShield Wizard", "Configuration du service SpeechMagic", "", "!m")
ControlSend("InstallShield Wizard", "Configuration du service SpeechMagic", "", "xxxxxxxx")
ControlSend("InstallShield Wizard", "Configuration du service SpeechMagic", "", "!c")
ControlSend("InstallShield Wizard", "Configuration du service SpeechMagic", "", "xxxxxxxx")
ControlSend("InstallShield Wizard", "Configuration du service SpeechMagic", "", "!s")
WinWait("InstallShield Wizard", "Lancer la copie des fichiers")
ControlSend("InstallShield Wizard", "Lancer la copie des fichiers", "", "!s")
WinWait("Information")
ControlSend("Information", "", "", "{ENTER}")
WinWait("Question")
ControlSend("Question", "", "", "!n")

 

When it's started using SCCM:

image.png.82735e170130f33f1091caa36cc795c5.png

Can anyone help me sorting this out ?

I've never needed to use AutoIT so excuse me for my ignorance. I've tried using various examples to create this script and was pleased with the result when started from the user's command prompt but it's not the most efficient way to do using SCCM...

Thanks for your help.

Link to comment
Share on other sites

As the software uses InstallShield for installation I'm sure this can be automated by command line parameters.
Please have a look at the docu. Or search the forum for "InstallShield" ;)

Even the SpeechMagic installation documentation talks about a ilent install.

You are talking about an very old version of SpeechMagic - which one actually?

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Hi Water,

Thanks for your reply. I indeed install the 6.1 version.

Thanks for those information but the documentation only talks about the Terminal Server silent installation but not the silent installation of the application itself.

Regarding InstallShield, I've already tried creating an ISS file but it doesn't take any common switches such as /s /f1"c:\temp\install.iss"

It's obviously not a full InstallShield setup.

Is it that hard to make this AutoIT script compatible with a SCCM installation ?

Link to comment
Share on other sites

if it's an MSI based installation, then it won't use the switches you specified and does not need an .iss response file.

That is, unless you didn't create the .iss file correctly by running the installer with a /r for record, and it records the .iss

find out what kind of install it is then we can talk

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

  • Moderators

I am looking in the folder for 6.1 on the website itself and they have their own "Silent.txt" showing the suggested way of doing a silent install. You're saying this is not working for you?

http://www.eksberg.se/ee/?dir=Apps/SpeechMagic 6.1/SpeechMagic6.1

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

ok, so run that setup.exe with a /r on the command line and run through an install (do this in a VM)  and it will create an ISS file in the Windows directory, after that you pair that ISS file with your installer for a silent install. is that what you did and it didn't work? please explain.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

Here's exactly what I'm trying to automate... 

I've removed the login / password part that you see as blank.

The ISS file I've re-created for the 3rd time stops at the Database question

 

 

setup.iss

Edited by Tof006
Removing animated gif :(
Link to comment
Share on other sites

Once again, is it impossible to handle the Interactive services with the AutoIT script ?

I have not that much time to spend on this crappy software so if it's not possible, I'll explain the guys on the field how to manually install this app using the AutoIT script I've created.

Edited by Tof006
Link to comment
Share on other sites

22 minutes ago, Earthshine said:

it's probably not impossible. those forms are just class #32770 dialog box easily manipulated by AutoIt

if i could download the software I could take a look

It's gonna be a bit hard to download the software as it needs a connection to the oracle DB to proceed with the installation.

This software is also under licencing so I cannot send any copy like this unfortunately.

Sorry about that.

 

 

Link to comment
Share on other sites

  • Moderators

@Tof006 Look at the AutoIt Window Info Tool, in the same directory where you installed AutoIt. Grab the cross-hair symbol and hover over the button/controls you want to click. This should give you information about the control. Then you can look at the Control* functions in the helpfile to help you click/send the info you need.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

your method of waiting does not seem adequate. I would suggest finding the exact control you want to press/activate in a more accurate manner

as mentioned above, use the AutoIt Information Tool to get the controls you want. I wrote a very small udf that automatically waits for controls. You will also need Log4a.au3 as well (click the link)

 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

I thank you all for your help.

I'm gonna try to sort this out with your advises and let you know tomorrow if it's OK.

I just fear not to be able to understand how to understand how to call these differently.

Thanks again

Edited by Tof006
Link to comment
Share on other sites

you can use that info for automatically waiting for a control to exist using the links i posted above. let me whip up a small sample app that would use the udfs. remember though, I can't speak/read/write French in any way so you will have to massage it to your needs. give me a few.

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

something like this, but this is only dealing with that ok button, you can make it press all the buttons in the setup, you just define the button text and hotkey. as I stated, I don't know French but they should have similar meaning I believe

#AutoIt3Wrapper_Compression=3
#AutoIt3Wrapper_UseUpx=y
#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
#AutoIt3Wrapper_Add_Constants=n
#AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#RequireAdmin

#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include 'log4a.au3'
#include 'WaitForControls.au3'

Const $TD_BTN_NEXT = '&Next >'
Const $TD_BTN_INSTALL = '&Install'
Const $TD_BTN_INSTALL2 = 'Install'
Const $TD_BTN_FINISH = '&Finish'
Const $TD_BTN_CANCEL = 'Cancel'
Const $TD_BTN_IAGREE = "I &accept the terms in the license agreement"
Const $TD_BTN_ALTFINISH = '&Finish'
Const $TD_BTN_ALLOW_ACCESS = '&Allow access'
Const $TD_BTN_REMOVE = '&Remove'
Const $TD_BTN_YES = '&Yes'
Const $TD_BTN_OK = 'OK'
Const $TD_BTN_TYPICAL = '&Typical'
Const $TD_EDIT_DATA = '99999'
Const $TD_TREE_NAME = 'Tree1'

Const $text = "Put your official text you are looking for here...."
Const $stdClass = '[Class:#32770]'
Const $button1 = "[CLASS:Button; INSTANCE:1]"


#Region ;**** Logging  This sections sets up logging. If you compile it, it creates a nice text log file with the script name and a .log at the end. ****
; Enable logging and don't write to stderr
_log4a_SetEnable()
; Write to stderr, set min level to warn, customize message format
_log4a_SetErrorStream()
_log4a_SetCompiledOutput($LOG4A_OUTPUT_FILE)
_log4a_SetMinLevel($LOG4A_LEVEL_DEBUG)
; If @compiled Then _log4a_SetMinLevel($LOG4A_LEVEL_WARN) ; Change the min level if the script is compiled
_log4a_SetFormat("${date} | ${host} | ${level} | ${message}")
#EndRegion ;**** Logging ****


Func Install()
    _log4a_Info('Begin Install()')
    _checkClickCtrl($stdClass, $text, $button1, $TD_BTN_OK, 0)
    _log4a_Info('End Install()')

EndFunc   ;==>Install

Install()

 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

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