Nsis Error Flag Example
Contents |
PageCommentView sourceHistory Personal nsis messagebox 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:20. 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 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. http://nsis.sourceforge.net/Reference/ClearErrors 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 ;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 https://nsis-dev.github.io/NSIS-Forums/html/t-268664.html 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 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.
help Register Rules Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion Error flag question User Name Remember Me? Password Thread Tools Search this Thread Display Modes 4th http://forums.winamp.com/showthread.php?t=287989 March 2008, 19:45 #1 AaronLS Senior Member Join Date: Mar 2008 Posts: 129 Error flag question In this case, if the first statement fails, and then the second statement succeeds, would the error flag carry through the second call and still be set when I test it? ExecShell "open" "http://nsis.sf.net/" ExecShell "open" "$INSTDIR\blah.txt" ${If} ${Errors} DetailPrint "Failed to open blah.txt" ${EndIf} Or do I need to do nsis error something more like this to ensure the erro flag is cleared?: ExecShell "open" "http://nsis.sf.net/" ${If} ${Errors} ${EndIf} ExecShell "open" "$INSTDIR\blah.txt" ${If} ${Errors} DetailPrint "Failed to open blah.txt" ${EndIf} AaronLS View Public Profile Find More Posts by AaronLS 4th March 2008, 21:03 #2 kichik M.I.A.[NSIS Dev, Mod] Join Date: Oct 2001 Location: Israel Posts: 11,342 It will carry on until it's cleared by ClearErrors or IfErrors. NSIS nsis error flag FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius kichik View Public Profile Visit kichik's homepage! Find More Posts by kichik 4th March 2008, 22:18 #3 AaronLS Senior Member Join Date: Mar 2008 Posts: 129 Thanks again AaronLS View Public Profile Find More Posts by AaronLS Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion Error flag question User Name Remember Me? Password « Previous Thread | Next Thread » Thread Tools Search this Thread Show Printable Version Email this Page Search this Thread: Advanced Search Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 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 Rules Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Tech Support Greatest Hits Winamp Winamp Technical Support Winamp Discussion Winamp Wishlist Winamp Bug Reports Winamp for Android Win