萍子(萍子广场舞别哭了宝贝)

    今天查一个问题,我们的产品在运行是,点击安装,会报错,找到一个结束进程的控件processwork.dll
    下载地址:http://www.esanu.name/programs/NSISKillProcess.html 
     将processwork.dll放到Plugins目录下,然后在NSIS代码中加入如下函数:

Function CloseParentWithUserApproval
Push $5

loop:
  push "*.exe"
  processwork::existsprocess
  萍子 pop $5
  IntCmp $5 0 done

  MessageBox MB_RETRYCANCEL|MB_ICONSTOP “Your process must be closed during this installation.$ $

Close your process now, or press Retry to automatically close and continue or press Cancel to cancel the installation entirely.“  IDCANCEL BailOut
  push "*.exe"萍子
  processwork::KillProcess
  Sleep 2000
Goto loop

BailOut:
  Abort

done:
Pop $5
FunctionEnd  

转载请说明出处 内容投诉内容投诉
九幽软件 » 萍子(萍子广场舞别哭了宝贝)