Checking if another application is installed
-
Does Qt have a way to check to see if another application is already installed? I'm writing a desktop Qt application that talks to R, and would like to check if it's installed. Perhaps QProcess is the best way to go, but I'm not sure and am open to suggestions.
Thanks. -
You can look for its executable in the default location R would install or the usual locations for the system. Look for a configuration file or registry key the R installer/program creates (a Start menu entry for example) or its uninstaller entry. There's no foolproof generic method that I am aware of... if all else fails ask the user to locate it.
On Windows try under:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\R.exe
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\R -
-
QtSingleApplication is not going to do anything to help you detect if an application is installed. QtSingleApplication only helps to detect if another instance of the application is already running.
-
[quote author="Andre" date="1360925083"]QtSingleApplication is not going to do anything to help you detect if an application is installed. QtSingleApplication only helps to detect if another instance of the application is already running. [/quote]
My brain somehow saw already running instead of already installed, my bad sorry to jump in :)