localsetup and AutoIT

Antworten
sbmk
Beiträge: 21
Registriert: 08 Jun 2016, 09:59

localsetup and AutoIT

Beitrag von sbmk »

Hi,

I am trying to perform an automated installation of a software using OPSI.

It has to be done with an admin account, so I have to use a localsetup.

The problem I have is rather strange : I am using AutoIT to select things and toggle checkboxes.

Everything is fine except I can't send "SPACE" key when the script is running on localsetup ! Other keys are working, except "SPACE" .

If I try the script in my interactive session running winst gui, it works flawlessly.

Same if I perform a regular package installation, but the installation itself will be a failure because of the need of admin privileges. Nothing to do with OPSI.

But on a localsetup context, this pecular key is never "stroke".

Any idea ?

Regards
AlexB
Beiträge: 80
Registriert: 07 Mär 2017, 17:41

Re: localsetup and AutoIT

Beitrag von AlexB »

Hey,

did you set the "debug"-property to true?
Per default it's false and thus disables the keyboard while you are signed in as a local admin (to prevent user interaction, hacks, etc).
sbmk
Beiträge: 21
Registriert: 08 Jun 2016, 09:59

Re: localsetup and AutoIT

Beitrag von sbmk »

Hi,

When I say I can't send "SPACE" it means ControlSend("{space}") in AutoIT doesn't work. No error, but no action.

I am running the script with debug mode on, and of course I can toggle the checkboxes if I press spacebar manually.

This is crazy, because "up", "down", "enter", ... work.
bernd670
Beiträge: 90
Registriert: 16 Mär 2018, 10:44

Re: localsetup and AutoIT

Beitrag von bernd670 »

Hello,

ControlSend need minimum 4 parameters, you can try the Send-Command. The missing parameters for ControlSend can be determined with the tool Au3Info.
MfG
Bernd
sbmk
Beiträge: 21
Registriert: 08 Jun 2016, 09:59

Re: localsetup and AutoIT

Beitrag von sbmk »

Yes, I know it takes several parameters, I wanted to write a short version not to bother people with useless details.

Fortunately, the GUI has a button that resets all selections. I can send a click on it.

After that, I can "{down}" as many times as required to reach the checkbox I want to toggle. This works.

Then I want "{space}" to select something, it doesn't work in localsetup, even with debug enabled. But it does in other modes.

I added one more "{down}" after the "{space}", it goes down without problem but nothing has been selected. Adding timers around "{space}" doesn't change anything.

I will try "Send", thanks for the suggestion.

Regards
Benutzeravatar
SisterOfMercy
Beiträge: 1522
Registriert: 22 Jun 2012, 19:18

Re: localsetup and AutoIT

Beitrag von SisterOfMercy »

What program are you trying to install? You probably don't need autoit.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
sbmk
Beiträge: 21
Registriert: 08 Jun 2016, 09:59

Re: localsetup and AutoIT

Beitrag von sbmk »

The software is Fanuc RoboGuide.
I have to do that because it has a buggy installer, able to record a response file but omitting some of the items when replaying it.
So I need to install two modules among a list of 20, and even if my response file only contains the required items, the whole list is installed !
A graphic install with just two checkboxes to check would have been a nice solution, but unfortunately it doesn't work.
So I had to install the whole thing, making installation last a loooot longer than required.
Benutzeravatar
SisterOfMercy
Beiträge: 1522
Registriert: 22 Jun 2012, 19:18

Re: localsetup and AutoIT

Beitrag von SisterOfMercy »

I can't download that software. So I can't make a package out of it for you. PM me if you have a download link and can provide me with enough information to get this done for you. (and not too much so it is still 'safe' for you as a licensee of this program)

I have found out that some installers are very retarded. What works better: using a program like systracer to record the state of the system before and after installation. Sometimes you end up with a lot of dependencies, but often you already have these available. For instance, the microsoft visual c++ runtimes.
Sometimes it is more work to begin with. In the long run these scripts without running stuff are more stable and dependable. No weird errors popping up because the msi file has changed a bit or whatever. In your case, this would mean not having to check the installer for changed things every version.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Antworten