In Inno setup, I want to check whether previous version of an application is installed, and uninstall it automatically if it is detected. The registry key to check if the application exists is this: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Adobe Shockwave Player
And the silent uninstallation command is this: C:\Windows\system32\Adobe\Shockwave 12\uninstaller.exe /S
. Note-The setup of the application was developed using NSIS.
And one more thing, I want no message box to be shown if previous version is found. The previous version of the same application is v12.1.3.153 or lower. Full Inno script for any reference: http://pastebin.com/HmrNcFd4
So please provide the code. Thanks a lot!!