代码之家  ›  专栏  ›  技术社区  ›  fredrik

如何查询/调试NSIS错误?

  •  0
  • fredrik  · 技术社区  · 7 年前

    在我的 Installer.nsi . 我的卸载程序部分中有:

    ClearErrors
    
    RMDir /r "$InstDir"
    
    IfErrors 0 +2
      MessageBox MB_OK "Unable to uninstall all files."
    

    在卸载过程中,我看到一个消息框,它表明有一个错误。

    问题 :如何调试导致messagebox显示的错误?

    1 回复  |  直到 7 年前
        1
  •  2
  •   Anders    7 年前

    /r .

    如果文件/目录不多,可以使用普通 Delete RmDir 每个的说明。

    从文件系统获取错误代码的唯一方法是使用 Process Monitor 看看失败的操作。