Old 20th June 2007, 15:20   #1
daisywheel
Junior Member
 
Join Date: May 2007
Posts: 40
Inform user about application using dll

Hi All,

Is it possible in NSIS to infom user during installation or uninstallation what application is using dll which this installer want to update or remove?

tnx,
Roman
daisywheel is offline   Reply With Quote
Old 21st June 2007, 06:32   #2
michaelcsikos
Junior Member
 
Join Date: Dec 2005
Location: Brisbane, Australia
Posts: 16
If you are trying to upgrade system DLLs you should use the InstallLib macro (B.2 Library Installation in the manual), which has REBOOT_PROTECTED and REBOOT_NOTPROTECTED methods. You don't have to worry about whether these files are in use as they will be updated on reboot if they are in use.

For your own files, you can use the FindProcDLL plug-in to check one at a time if any of your executables are in use and display a message if they are:

code:
Function CheckRunning
check_running:
FindProcDll::FindProc "MyProgram.exe"
${If} $R0 == 1
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "Setup has detected a running instance of \
MyProgram. Please close MyProgram and click OK to continue." IDOK +2
Abort
Goto check_running
${EndIf}
FunctionEnd

michaelcsikos is offline   Reply With Quote
Old 21st June 2007, 07:43   #3
daisywheel
Junior Member
 
Join Date: May 2007
Posts: 40
I'm using InstallLib macro for instalation of my dll files but I would like to avoid rebooting. My software doesn't need it.
I run InstallLib macro with NOTSHARED NOREBOOT_PROTECTED flags and when dll is used by another process message box appears saying some dll is busy. This is enough informaiton for me as for developer but I afraid common user won't understand it. I prefer to show message box like
"Internet Explorer is using some components. Close this application to continue installation"

I don't know for sure if IE the only application which could use my dll files so it's not so easy to use
FindProcDll::FindProc function

Any ideas how can I help end-user to understand what application is blocking installation?
daisywheel is offline   Reply With Quote
Old 21st June 2007, 08:59   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I think the easiest solution is to ask the user to close all programs before continuing.

Stu
Afrow UK is offline   Reply With Quote
Old 21st June 2007, 09:15   #5
daisywheel
Junior Member
 
Join Date: May 2007
Posts: 40
Quote:
Originally posted by Afrow UK
I think the easiest solution is to ask the user to close all programs before continuing.

I don't think it will be really user friendly. InstallShield can do it so I hope NSIS can do it too.

Doesn't anybody has written such plugin yet?
daisywheel is offline   Reply With Quote
Old 21st June 2007, 10:27   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
There is WhoUses.exe but I do not think it will work on Windows 9x.
http://www.codeguru.com/cpp/w-p/syst...cle.php/c2827/

Stu
Afrow UK is offline   Reply With Quote
Old 21st June 2007, 13:18   #7
daisywheel
Junior Member
 
Join Date: May 2007
Posts: 40
Quote:
Originally posted by Afrow UK
There is WhoUses.exe but I do not think it will work on Windows 9x.
http://www.codeguru.com/cpp/w-p/syst...cle.php/c2827/

Stu
Well, win9x is not target system for me.

Thank you for advise.
daisywheel 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