NSIS脚本 - 单独的Uninstall.exe文件不会被删除

时间:2016-09-07 06:54:18

标签: nsis

我使用以下语句从已安装目录中删除文件和子目录。

SELECT DISTINCT ticket.ticket_id,lock_id,ticketID,ticket.dept_id,ticket.staff_id,subject,ticket.name,ticket.email,dept_name,lastresponse ,ticket.status,ticket.source,message.message,isoverdue,isanswered,ticket.created,pri.* ,count(attach.attach_id) as attachments ,staff.firstname,staff.lastname , IF(ticket.reopened is NULL,ticket.created,ticket.reopened) as effective_date FROM kt_ticket ticket LEFT JOIN kt_department dept ON ticket.dept_id = dept.dept_id LEFT JOIN kt_priority pri ON ticket.priority_id=pri.priority_id LEFT JOIN kt_ticket_lock tlock ON ticket.ticket_id=tlock.ticket_id AND tlock.expire>NOW() LEFT JOIN kt_ticket_attachment attach ON ticket.ticket_id=attach.ticket_id LEFT JOIN kt_ticket_message message ON (ticket.ticket_id=message.ticket_id ) LEFT JOIN kt_staff staff ON ticket.staff_id=staff.staff_id WHERE 1=1 AND status='open' AND ticket.pp_group = 1 AND message.msg_type=R GROUP BY ticket.ticket_id ORDER BY ticket.created DESC LIMIT 0,25

卸载时,它不会从已安装的目录中单独删除uninstall.exe文件。

请告诉我你的建议。

1 个答案:

答案 0 :(得分:0)

  1. 您是否尝试过/REBOOTOK标志?

  2. 请注意scripting reference

  3. 中的此警告
      

    警告:在卸载程序中使用RMDir / r $ INSTDIR是不安全的。   虽然不太可能,但用户可能会选择安装到本程序   Files文件夹,因此该命令将清除整个程序   Files文件夹,包括与其无关的其他程序   卸载程序。用户还可以放置其他文件,但程序的文件   并期望它们会被程序删除。解决方案是   available只能轻松卸载安装的文件   安装程序。