Nsis Error Flag
Contents |
a recoverable error (such as trying to delete a file that is in use) occurs. ClearErrors File file.dat IfErrors 0 +2 Call ErrorHandler Command introduced with NSIS v1.2g Retrieved from "http://nsis.sourceforge.net/mediawiki/index.php?title=Reference/IfErrors&oldid=23609" Views PageCommentView sourceHistory Personal tools Create account Log in Website navigation Main PageNewsFeaturesScreenshotsNSIS 2LicenseDocumentationSupportCommunityFAQBug ReportsRequestsDeveloper CenterPlug-insTutorialsExamplesDownloadSpecial BuildsDevelopment FilesUsersContactWiki Information Search donate ads This page was last modified on 4 June 2013, at 20:19. Disclaimers
PageCommentView sourceHistory Personal tools Create account http://nsis.sourceforge.net/Reference/SetErrors Log in Website navigation Main PageNewsFeaturesScreenshotsNSIS 2LicenseDocumentationSupportCommunityFAQBug ReportsRequestsDeveloper CenterPlug-insTutorialsExamplesDownloadSpecial BuildsDevelopment FilesUsersContactWiki Information Search donate ads This page was last modified on 27 November 2011, at 19:09. Disclaimers
try to delete a file during the uninstallation, just like some .dll, .exe files. If they are still in use or rights issues, I couldn't https://nsis-dev.github.io/NSIS-Forums/html/t-268664.html delete them. When trying to overwrite the files, i couldn't overwrite them? how can I detect them? and how to solve? Any thoughts? James kichik 30th March 2007 20:09 UTC Use the Library macros. http://nsis.sourceforge.net/Docs/AppendixB.html JamesKiller 30th March 2007 22:13 UTC coulde you give me an example???? Thank you. kichik 30th March 2007 22:17 UTC That page contains examples. JamesKiller 30th March 2007 22:42 UTC IfFileExists "$INSTDIR\MyApp.exe" 0 new_installation nsis error ;Replace MyApp.exe with your application filename StrCpy $ALREADY_INSTALLED 1 new_installation: !insertmacro InstallLib REGDLL $ALREADY_INSTALLED REBOOT_NOTPROTECTED dllname.dll $SYSDIR\dllname.dll $SYSDIR hmmmm if i have 20 files, i should write them like above 20 times? kichik 30th March 2007 22:47 UTC If your DLL files are not shared, there is no need for anything but the InstallLib macro. Instead of $ALREADY_INSTALLED, use NOTSHARED. If they are shared, do the test just once, keep nsis error flag the value in $ALREADY_INSTALLED and just add more InstallLib lines. JamesKiller 30th March 2007 23:18 UTC If a file is locked, how can i get the error message? If the istaller has error, how can I display error message, I mean NSIS error message.. Iferrors 0 MessageBox MB_OK error_message(NSIS message,not my own message) JamesKiller 30th March 2007 23:21 UTC ------------------- on the link you gave to me, it says it can: *** Windows File Protection checks *** How to checks, if file protected, how can show message? kichik 30th March 2007 23:21 UTC If a file is locked the error flag will be set and, if you've enabled reboot, the reboot flag will also be set. There's no message, just a state of failure to delete or replace the file. kichik 30th March 2007 23:22 UTC Files installed by your application are most probably not protected. Only system files are protected by WFP. JamesKiller 30th March 2007 23:47 UTC when I run in windows mode (not silent mode, it will show the file is in use. However, run in silent mode . it won't show the error message..... I am expecting the error message in the silent mode. kichik 30th March 2007 23:59 UTC What error m