seckg
14th January 2009 19:40 UTC
How do we overwrite a running file
Hi All,
My install script (NSI)already set SetOverwrite on
but when the file (dll or exe) is running, NSI setup
just ignore it, and it will not be upgraded even
restart the computer.
Section "-Compsect" SEC0000
SetOutPath $INSTDIR
SetOverwrite on
File ..\ty.ocx
File ..\logo.gif
File ..\tty.dll
File ..\vcredist_x86.exe
Is there any solution for this?
BTW, I want to conditional install vcredist_x86.exe if it
is not installed, I can check registry, how do i implement
it in NSI script
Best Regards
Seckg
Afrow UK
14th January 2009 20:49 UTC
See /rebootok for the File instruction.
Stu
Ivan Andreevich
14th January 2009 20:54 UTC
DLL/exe setup (including rebooting if needed): http://nsis.sourceforge.net/Docs/AppendixB.html
Check if exe is running: http://nsis.sourceforge.net/FindProcDLL_plug-in
Kill exe: http://nsis.sourceforge.net/KillProcDLL_plug-in
Conditional installation of VC++ 2005 redist SP1:
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7299052b-02a4-4627-81f2-1818da5d550d}" DisplayName
${If} $R0 == ""
;extract the file
ExecWait '"msiexec" /i "path/to/msi" /quiet'
${EndIf}
Non-SP1 is here HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A49F249F-0C91-497F-86DF-B2585E8E76B7}
seckg
19th January 2009 23:01 UTC
It seems that /REBOOTOK only works with
Delete command, doesn't work with File command.
-Seckg
Red Wine
20th January 2009 05:32 UTC
That could be done by examining the target system for certain running processes before the actual installer/uninstaller loads as already suggested above by Ivan.
Afrow UK
20th January 2009 15:36 UTC
See the macro on this page:
http://forums.winamp.com/showthread.php?threadid=293513
Stu
seckg
20th January 2009 18:20 UTC
That works
Thank you very much, it helps.
-Seckg