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

Asked by Asheru

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:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
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)

Revision history for this message
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.

Revision history for this message
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

Revision history for this message
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.

Revision history for this message
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

Revision history for this message
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.