暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. Public Class SYS_UPDATE
  2. Dim 有更新 As Boolean
  3. Private Sub SYS_UPDATE_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  4. End Sub
  5. Private Sub SYS_UPDATE_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
  6. Application.DoEvents() : 有更新 = False
  7. '-------------------確定連線--------------------------------------------------------------------------------------
  8. If SQL_連線狀態模組1.ConnectTest1("192.168.110.164") = True Then
  9. 內網IP連線() : Target = "http://192.168.110.164:8888/HF-MIS/"
  10. Else
  11. 台灣測試連線() : Target = "https://gcm-smart.com/ERP/HF-MIS/"
  12. End If
  13. '-------------------讀取版本--------------------------------------------------------------------------------------
  14. SQL_系統版本號驗證() : If dr.Read() Then : 資料庫版本 = dr("系統認證版本號") : End If : conn.Close()
  15. '-------------------判斷檔案--------------------------------------------------------------------------------------
  16. Timer1.Enabled = True
  17. End Sub
  18. Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
  19. Timer1.Enabled = False
  20. Dim Str As String = Application.StartupPath : Dim FS As String
  21. Dim filePath As String = Str & "\HF-MIS-SYS-" & 資料庫版本 & ".exe"
  22. If IO.File.Exists(filePath) Then : Else : My.Computer.Network.DownloadFile(Target & "HF-MIS-SYS.exe", filePath, "", "", False, 10000, True) : 有更新 = True : End If
  23. FS = "BouncyCastle.Cryptography.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  24. FS = "BouncyCastle.Cryptography.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  25. FS = "Enums.NET.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  26. FS = "Enums.NET.pdb" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  27. FS = "Enums.NET.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  28. FS = "EPPlus.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  29. FS = "EPPlus.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  30. FS = "ExtendedNumerics.BigDecimal.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  31. FS = "ExtendedNumerics.BigDecimal.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  32. FS = "HF-MIS-SYS.application" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  33. 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
  34. 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
  35. FS = "HF-MIS-SYS.pdb" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  36. FS = "HF-MIS-SYS.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  37. FS = "ICSharpCode.SharpZipLib.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  38. FS = "ICSharpCode.SharpZipLib.pdb" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  39. FS = "ICSharpCode.SharpZipLib.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  40. FS = "MathNet.Numerics.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  41. FS = "MathNet.Numerics.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  42. FS = "Microsoft.IO.RecyclableMemoryStream.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  43. FS = "Microsoft.IO.RecyclableMemoryStream.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  44. FS = "Microsoft.VisualBasic.PowerPacks.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  45. FS = "NPOI.Core.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  46. FS = "NPOI.Core.pdb" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  47. FS = "NPOI.Core.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  48. FS = "NPOI.OOXML.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  49. FS = "NPOI.OOXML.pdb" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  50. FS = "NPOI.OOXML.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  51. FS = "NPOI.OpenXml4Net.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  52. FS = "NPOI.OpenXml4Net.pdb" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  53. FS = "NPOI.OpenXml4Net.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  54. FS = "NPOI.OpenXmlFormats.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  55. FS = "NPOI.OpenXmlFormats.pdb" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  56. FS = "NPOI.OpenXmlFormats.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  57. FS = "SixLabors.Fonts.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  58. FS = "SixLabors.Fonts.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  59. FS = "SixLabors.ImageSharp.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  60. FS = "SixLabors.ImageSharp.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  61. FS = "System.Buffers.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  62. FS = "System.Buffers.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  63. FS = "System.ComponentModel.Annotations.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : End If
  64. FS = "System.Memory.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  65. FS = "System.Memory.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  66. FS = "System.Numerics.Vectors.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  67. FS = "System.Numerics.Vectors.xml" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  68. 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
  69. 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
  70. 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
  71. 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
  72. 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
  73. 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
  74. 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
  75. 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
  76. 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
  77. 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
  78. FS = "ThoughtWorks.QRCode.dll" : If IO.File.Exists(Str & "\" & FS) Then : Else : My.Computer.Network.DownloadFile(Target & FS, Str & "\" & FS) : 有更新 = True : End If
  79. '-------------------執行主程式--------------------------------------------------------------------------------------
  80. If 有更新 = True Then : System.Threading.Thread.Sleep(2000) : End If
  81. Shell(filePath, vbNormalFocus) : Me.Close()
  82. End Sub
  83. End Class