Archive: how to detect is a application is already installed.


how to detect is a application is already installed.
Hi Friends.
I want to know how to detect if an application is already installed. So that if it is installed, then NSI should not continue with installation.

regards,
reeya


Hi Reeya,

you could do this by checking an registry value that have to exist when the app is installed or by checking for the app.exe.


IfFileExists "app.exe" lblAppExists lblNoAppExists
lblAppExists:
MessageBox MB_OK "App already installed!"
lblNoAppExists:
SetOutPath "$INSTDIR"
File "app.exe"


or by registry value:


ReadRegStr $0 HKCU "Software\YourName\YourApp\Settings\" "Installed"
IfErrors lblNoApp lblAlreadyInstalled
lblNoApp:
SetOutPath "$INSTDIR"
File "app.exe"
lblAlreadyInstalled:
MessageBox MB_OK "App already installed!"


You can use the Abort command to stop the installation process.

Hope it helps -
Regards,
~ Florian

Thanx
hey...

Thanx a lot. appreciate.
I actually got it working using similar procedure.

Thanx again.
Reeya