Jump to content

Different actions depending on the language


Recommended Posts

Hi folks,

I write package for silent installation in AutoIT for one app, everything works, but I have small problem, i can't handle with.

Depending from OS Language different PopUp appears and then should be take proper action.

I was try with below code, but with no luck. Any sugestions what I'm doing wrong? 

Script should work like this: 

  1. Script start,
  2. open exe program,
  3. window with first select appear. Depending on language - different info [popup],
  4. clik OK,
  5. another window appear - ony click OK needed,
  6. exit script.

I have problem with point 3 only, other works fine.

BlockInput(0)

Run(@ScriptDir & '\Setup.exe /S')
AutoItSetOption('MouseCoordMode', 0)

While 1
   If WinExists("Installationssprache", "") Then

      WinWait('Installationssprache','Bitte wählen Sie die Sprache der Installation')
      WinActivate('Installationssprache')
      MouseClick('primary', 154, 134, 1, 0)

      WinWait('MultiCalc Installation','Einträge in das Startmenü können')
      WinActivate('MultiCalc Installation')
      MouseClick('primary', 253, 144, 1, 0)

   EndIf

   If WinExists("Installation Language", "") Then

      WinWait('Installation Language','Bitte wählen Sie die Sprache der Installation')
      WinActivate('Installation Language')
      MouseClick('primary', 154, 134, 1, 0)

      WinWait('MultiCalc Installation','Einträge in das Startmenü können')
      WinActivate('MultiCalc Installation')
      MouseClick('primary', 253, 144, 1, 0)

   EndIf
   
   If WinExists("Jezyk Programu Instalacyjnego", "") Then

      WinWait('Jezyk Programu Instalacyjnego','Prosze wybrac jezyk w którym zostanie zainstalowany program')
      WinActivate('Jezyk Programu Instalacyjnego')
      MouseClick('primary', 154, 134, 1, 0)

      WinWait('Instalator programu MultiCalc','Ikony')
      WinActivate('Instalator programu MultiCalc')
      MouseClick('primary', 253, 144, 1, 0)

   EndIf

Wend

EXIT
But with no luck. Any sugestions what I'm doing wrong? 
Link to post
Share on other sites

1. Are you sure, that the WinWait parameters are correct ?

2. I think, there should be an ExitLoop in the If statements

If WinExists(...) Then
        (...)
        ExitLoop
    EndIf

 

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to post
Share on other sites
3 hours ago, Earthshine said:

the setup isn't silent at all then, because it should NEVER ask you for input in silent mode. 

You are also right. This is small app  - building calc. I was try with all switches I know, and only "Setup.exe /S" install it with silent mode, but ask at the beginning for language and then for Start Menu shortcuts - for everyone or only current user. Uninstaller.exe also work with this switch, and only ask for lang.

Link to post
Share on other sites

give me download link to the installer, i will have a look you should be able to type setup /? and get a form that pops up showing the switches, if it's an MSI

it's not an msi, it's a self extracting exe is all, from what i could find on internet.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to post
Share on other sites

As WinWait('MultiCalc Installation'... suggests, we probably talk about the software (a freeware calculator) :

https://www.consoft.de/ftp/pub/multicalc/MultiCalcSetup.exe

1 hour ago, Earthshine said:

it's not an msi, it's a self extracting exe is all, from what i could find on internet.

Yes, I can confirm that ! I also couldn't find any information about commandline parameters on their company website or anywhere else.

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

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

    No registered users viewing this page.

×
×
  • Create New...