1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- Public Class SYS_UPDATE
- Dim 有更新 As Boolean
- Private Sub SYS_UPDATE_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- End Sub
- Private Sub SYS_UPDATE_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
- Application.DoEvents() : 有更新 = False
- '-------------------確定連線--------------------------------------------------------------------------------------
- If SQL_連線狀態模組1.ConnectTest1("192.168.110.164") = True Then
- 內網IP連線() : Target = "http://192.168.110.164:8888/HF-MIS/"
- Else
- 台灣測試連線() : Target = "https://gcm-smart.com/ERP/HF-MIS/"
- End If
- '-------------------讀取版本--------------------------------------------------------------------------------------
- SQL_系統版本號驗證() : If dr.Read() Then : 資料庫版本 = dr("系統認證版本號") : End If : conn.Close()
- '-------------------判斷檔案--------------------------------------------------------------------------------------
- Timer1.Enabled = True
- End Sub
- Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
- Timer1.Enabled = False
- Dim Str As String = Application.StartupPath : Dim FS As String
- Dim filePath As String = Str & "\HF-MIS-SYS-" & 資料庫版本 & ".exe"
- If IO.File.Exists(filePath) Then : Else : My.Computer.Network.DownloadFile(Target & "HF-MIS-SYS.exe", filePath, "", "", False, 10000, True) : 有更新 = True : End If
- FS = "BouncyCastle.Cryptography.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "BouncyCastle.Cryptography.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "Enums.NET.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "Enums.NET.pdb" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "Enums.NET.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "EPPlus.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "EPPlus.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "ExtendedNumerics.BigDecimal.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "ExtendedNumerics.BigDecimal.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "HF-MIS-SYS.application" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "HF-MIS-SYS.exe.config" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "HF-MIS-SYS.exe.manifest" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "HF-MIS-SYS.pdb" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "HF-MIS-SYS.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "ICSharpCode.SharpZipLib.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "ICSharpCode.SharpZipLib.pdb" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "ICSharpCode.SharpZipLib.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "MathNet.Numerics.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "MathNet.Numerics.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "Microsoft.IO.RecyclableMemoryStream.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "Microsoft.IO.RecyclableMemoryStream.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "Microsoft.VisualBasic.PowerPacks.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "NPOI.Core.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "NPOI.Core.pdb" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "NPOI.Core.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "NPOI.OOXML.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "NPOI.OOXML.pdb" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "NPOI.OOXML.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "NPOI.OpenXml4Net.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "NPOI.OpenXml4Net.pdb" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "NPOI.OpenXml4Net.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "NPOI.OpenXmlFormats.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "NPOI.OpenXmlFormats.pdb" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "NPOI.OpenXmlFormats.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "SixLabors.Fonts.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "SixLabors.Fonts.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "SixLabors.ImageSharp.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "SixLabors.ImageSharp.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "System.Buffers.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "System.Buffers.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "System.ComponentModel.Annotations.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : End If
- FS = "System.Memory.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "System.Memory.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "System.Numerics.Vectors.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "System.Numerics.Vectors.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "System.Runtime.CompilerServices.Unsafe.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "System.Runtime.CompilerServices.Unsafe.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "System.Security.Cryptography.Pkcs.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : 有更新 = True : End If
- FS = "System.Security.Cryptography.Pkcs.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "System.Security.Cryptography.Xml.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "System.Security.Cryptography.Xml.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "System.Text.Encoding.CodePages.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "System.Text.Encoding.CodePages.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "System.Threading.Tasks.Extensions.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "System.Threading.Tasks.Extensions.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- FS = "ThoughtWorks.QRCode.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
- '-------------------執行主程式--------------------------------------------------------------------------------------
- If 有更新 = True Then : System.Threading.Thread.Sleep(2000) : End If
- Shell(filePath, vbNormalFocus) : Me.Close()
- End Sub
- End Class
|