提交 dba4b88b 编写于 作者: leaky114's avatar leaky114

1.22.4.25 更新升级程序

上级 cba70b54
B 更新日志 B 更新日志
......
...@@ -46,7 +46,7 @@ Public NotInheritable Class frmAbout ...@@ -46,7 +46,7 @@ Public NotInheritable Class frmAbout
'Dim frmupdate As New frmUpdate 'Dim frmupdate As New frmUpdate
'frmupdate.ShowDialog() 'frmupdate.ShowDialog()
If NewUpdater.CreateInAIUpdate() = True Then If NewUpdater.CreateUpdate() = True Then
NewUpdater.Update3() NewUpdater.Update3()
End If End If
End Sub End Sub
......
...@@ -90,15 +90,26 @@ Module NewUpdater ...@@ -90,15 +90,26 @@ Module NewUpdater
Return ShortVersion Return ShortVersion
End Function End Function
Public Function CreateInAIUpdate() As Boolean Public Function CreateUpdate() As Boolean
Dim path As String = My.Application.Info.DirectoryPath & "\InAIUpdate.exe" '文件释放路径
Dim resources As System.Resources.ResourceManager = My.Resources.ResourceManager
Dim b() As Byte = resources.GetObject("InAIUpdate")
Dim s As IO.Stream
Try Try
Dim path As String = My.Application.Info.DirectoryPath & "\simupdater.exe" '文件释放路径
Dim resources As System.Resources.ResourceManager = My.Resources.ResourceManager
Dim b() As Byte = resources.GetObject("simupdater")
Dim s As IO.Stream
s = IO.File.Create(path) s = IO.File.Create(path)
s.Write(b, 0, b.Length) s.Write(b, 0, b.Length)
s.Close() s.Close()
path = My.Application.Info.DirectoryPath & "\SimpleUpdater.dll" '文件释放路径
b = resources.GetObject("SimpleUpdater")
s = IO.File.Create(path)
s.Write(b, 0, b.Length)
s.Close()
'MessageBox.Show("资源释放成功") 'MessageBox.Show("资源释放成功")
Return True Return True
Catch ex As Exception Catch ex As Exception
...@@ -108,7 +119,7 @@ Module NewUpdater ...@@ -108,7 +119,7 @@ Module NewUpdater
Public Sub Update3() Public Sub Update3()
Try Try
Dim path As String = My.Application.Info.DirectoryPath & "\InAIUpdate.exe" '文件释放路径 Dim path As String = My.Application.Info.DirectoryPath & "\simupdater.exe '文件释放路径"
Dim DisplayVersion As String Dim DisplayVersion As String
DisplayVersion = ThisApplication.SoftwareVersion.DisplayVersion DisplayVersion = ThisApplication.SoftwareVersion.DisplayVersion
......
此差异已折叠。
此差异已折叠。
B'设置为一个动作,可一次撤销 B'设置为一个动作,可一次撤销
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册