I write a script on AutoIt Scripting to automatically install programs without user intervention. It is necessary to check whether this program is there or not, if not then install, if yes go to the next one. step.

    1 answer 1

    It really depends on the program. There are lots of options.

    • Check for the existence of the default directory in which the program is installed. Same for executable program modules. The same applies to directories and files in common locations (Application Data, etc.). The same for files copied to system directories (System32, etc.). Check the presence of the program folder / shortcuts in the main menu.
    • Check whether the registry contains information about the installed program, if there is a path to the installation directory there - check its availability and the presence of executable modules.
    • Check in the registry for information in the Uninstall section for this program.
    • If the program installs its handlers and / or services - check their availability / availability.
    • If the program forms its associations, registers its types, etc. - check their presence.
    • If the program registers reusable libraries, check their registration in the registry.

    Etc.

    • But can it be as simple as that? - Nursultan Kenzhegaliyev
    • Yes, even all this together with all positive answers will not give an absolute guarantee that the software is installed correctly and workable ... - Akina
    • and how to do this: for example, we run install and there it displays the edit buttons, delete if this program already exists. How to check the button value? - Nursultan Kenzhegaliyev
    • Take a screenshot, drive through OCR ... I do not know, in short. - Akina