Old 28th November 2001, 04:32   #1
Reeyasen
Junior Member
 
Join Date: Nov 2001
Location: india
Posts: 2
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
Reeyasen is offline   Reply With Quote
Old 28th November 2001, 08:42   #2
F. Heidenreich
Member
 
F. Heidenreich's Avatar
 
Join Date: Nov 2001
Location: Dresden, Germany
Posts: 97
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.

code:

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



or by registry value:

code:

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

Last edited by F. Heidenreich; 28th November 2001 at 09:46.
F. Heidenreich is offline   Reply With Quote
Old 28th November 2001, 10:09   #3
Reeyasen
Junior Member
 
Join Date: Nov 2001
Location: india
Posts: 2
Thanx

hey...

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

Thanx again.
Reeya
Reeyasen is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump