App class - check for installed app without running it --- will not be implemented

Asked by Asheru on 2019-01-23

Hello,

Does class App from sikuli privodes a method that returns if the requested app is installed or not without opening it? I can't see this in documentation.

I know there are other ways to do it outside sikuli, but I was wondering if it;s possible with the help of sikuli App class.

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2019-01-23
Last reply:
2019-01-29
TestMechanic (ndinev) said : #1

Verifying if app is installed(correctly) will differ between OSes. I think it is not part of App class. I would suggest to implement it outside of sikuli (or if jyhton/java is an option you can use code directly in sikui)

RaiMan (raimund-hocke) said : #2

When the app executive is given with an absolute path, the existence is checked and in case an error message is created.

But you may simply try app.open(), it either works or does not.

It might be helpful, what exactly you would expect from such a feature.

Asheru (asheru93) said : #3

Just to be sure i'm searching for the app registry key and version System name.

def isAlreadyInstalled(lookupRegistryKey):
    consoleLines = os.popen('reg query "' + expectedRegistryKey + "\\" + expectedVersionSystemName + '"').readlines()
    if len(consoleLines) == 0:
        return False
    return True

RaiMan (raimund-hocke) said : #4

ok, understood.

But this is only valid for applications, that are installed by the appropriate Windows installation services (hence shown in the list of installed programs and can be uninstalled there).

Please confirm.

Asheru (asheru93) said : #5

Exactly, forgot to mention this. If the app is not installed via windows installer it won't work

expectedVersion = "appNameVersion"
expectedRegistryKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths" - this is kinda standard in this case

RaiMan (raimund-hocke) said : #6

Thanks for information,but this is a very special Windows-only feature, that I will not implement.

Can you help with this problem?

Provide an answer of your own, or ask Asheru for more information if necessary.

To post a message you must log in.