1。部署程序,只要第一次添加必要文件即可,以后自动更新修改的文件。
卸载操作
1.在打包項目中添加文件msiexec.exe(一般可在c:/windows/system32/下找到)
2.应用程序文件夾,在msiexec.exe上按右鍵,选择创建快捷方式,重命名快捷方式為"卸载".
3.更改此快捷方式的Arguments 为"/x {產品id}",產品id的值為打包項目的ProductCode屬性值.
参考网站:http://bbs.bccn.net/thread-180396-1-1.html
http://trip1988.blog.sohu.com/107507078.html
注意: 由于系统运行后,进程仍存在在系统进程中,导致无法正常卸载
解决方案:在form窗体 FormClosed事件中,关闭进程。
代码:
Private Sub MDI_KCYD_FormClosed(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles MyBase.FormClosed
Dim pProcess() As Process
pProcess = Process.GetProcesses()
Dim i As Integer
For i = 0 To pProcess.Length() - 1
If (pProcess(i).ProcessName = "SKIKCYD") Then
pProcess(i).Kill() '关闭进程
End If
Next
End Sub