Imports System.IO Imports System.Net Imports System.Text Imports System.Net.NetworkInformation Public Class OW_UPDATE ReadOnly ds2 As New DataSet ReadOnly computerProperties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties() ReadOnly IPEndPoint() As EndPoint = computerProperties.GetActiveTcpListeners() Dim myIPEndPoint As IPEndPoint Dim 內網線路, 開發線路, 刪除完成, OK1, OK2, OK3, OK4, OK5, OK6, OK7, OK8, OK9, OK10 As Boolean Dim Str As String = Application.StartupPath Dim TF As String Private Sub OW_UPDATE_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim strDirName As String : Dim Strs As String = Application.StartupPath If File.Exists(Strs & "\OPUPDATE.txt") Then File.Delete(Strs & "\OPUPDATE.txt") : End If strDirName = Strs & "\OPUPDATE.txt" Try Using fs As IO.FileStream = New IO.FileStream(strDirName, FileMode.Append) Using sw As StreamWriter = New StreamWriter(fs, Encoding.Default) Dim str1 As String = "..." sw.WriteLine(str1) '插入一整行 sw.Flush() End Using End Using Catch ex As Exception End Try '----------判斷是否有更新指定檔案------------------------------------------------------------------------------------- If File.Exists(Strs & "\OWUPDATE.txt") Then : Else strDirName = Strs & "\OWUPDATE.txt" Try Using fs As IO.FileStream = New IO.FileStream(strDirName, FileMode.Append) Using sw As StreamWriter = New StreamWriter(fs, Encoding.Default) Dim strk As String = "1" sw.WriteLine(strk) '插入一整行 sw.Flush() End Using End Using Catch ex As Exception End Try End If Target = "https://gcm-smart.com/ERP/OW-ERP/" Me.Text = "UPDATE " & TF '----------讀取更新指定檔案------------------------------------------------------------------------------------- Dim Str As String = Application.StartupPath If File.Exists(Str + "\OWUPDATE.txt") Then Dim filereader = My.Computer.FileSystem.OpenTextFileReader(Str + "\OWUPDATE.txt", System.Text.Encoding.Default) Dim Text As String = "" : Dim line As String = filereader.ReadLine() While Not (line Is Nothing) : Text = Text & line & vbCrLf : line = filereader.ReadLine() : End While : filereader.Close() If Strings.Left(Text, 1) = "1" Then 小更新_ch.Checked = True : 中更新_ch.Checked = False : 大更新_ch.Checked = False : 資料數 = 4 ElseIf Strings.Left(Text, 1) = "2" Then 小更新_ch.Checked = False : 中更新_ch.Checked = True : 大更新_ch.Checked = False : 資料數 = 70 ElseIf Strings.Left(Text, 1) = "3" Then 小更新_ch.Checked = False : 中更新_ch.Checked = False : 大更新_ch.Checked = True : 資料數 = 226 End If End If End Sub Private Sub OW_UPDATE_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown If 小更新_ch.Checked = True Then 刪除完成 = True : 小更新.Enabled = True ElseIf 中更新_ch.Checked = True Then 刪除完成 = True : 中更新.Enabled = True ElseIf 大更新_ch.Checked = True Then 刪除所有檔案.Enabled = True : 大更新.Enabled = True End If '--- 開啟專案--------------------------------------------------------------------------------------------------------------------------- OK.Enabled = True End Sub Private Sub 小更新_Tick(sender As Object, e As EventArgs) Handles 小更新.Tick If 刪除完成 = True Then 小更新.Enabled = False 主程式更新.Enabled = True : OK2 = True : OK3 = True : OK4 = True : OK5 = True : OK6 = True : OK7 = True : OK8 = True : OK9 = True : OK10 = True End If End Sub Private Sub 中更新_Tick(sender As Object, e As EventArgs) Handles 中更新.Tick If 刪除完成 = True Then 中更新.Enabled = False '--- 刪除在下載--------------------------------------------------------------------------------------------------------------------------- 主程式更新.Enabled = True : 刪除在下載.Enabled = True '--- 比對下載--------------------------------------------------------------------------------------------------------------------------- 驗證存在1.Enabled = True : 驗證存在2.Enabled = True : 驗證存在3.Enabled = True : 驗證存在4.Enabled = True : 驗證存在5.Enabled = True 驗證存在6.Enabled = True : 驗證存在7.Enabled = True : OK10 = True End If End Sub Private Sub 大更新_Tick(sender As Object, e As EventArgs) Handles 大更新.Tick If 刪除完成 = True Then 大更新.Enabled = False '--- 刪除在下載--------------------------------------------------------------------------------------------------------------------------- 主程式更新.Enabled = True : 刪除在下載.Enabled = True '--- 比對下載--------------------------------------------------------------------------------------------------------------------------- 驗證存在1.Enabled = True : 驗證存在2.Enabled = True : 驗證存在3.Enabled = True : 驗證存在4.Enabled = True : 驗證存在5.Enabled = True 驗證存在6.Enabled = True : 驗證存在7.Enabled = True End If End Sub Private Sub HX_CL_Tick(sender As Object, e As EventArgs) Handles HX_CL.Tick End Sub Public Sub Delay(ByRef Interval As Double) 'Interval单位为毫秒 Dim time As DateTime = DateTime.Now Dim Span As Double = Interval * 1234 While ((DateTime.Now.Ticks - time.Ticks) < Span) Application.DoEvents() End While End Sub Private Sub OK_Tick(sender As Object, e As EventArgs) Handles OK.Tick If OK1 = True And OK2 = True And OK3 = True And OK4 = True And OK5 = True And OK6 = True And OK7 = True And OK8 = True And OK9 = True And OK10 = True Then OK.Enabled = False : CheckBox11.Checked = True : Dim FS1 As String FS1 = "OWUPDATE.txt" : If File.Exists(Str & "\" & FS1) Then : File.Delete(Str & "\" & FS1) : End If Shell(Str + "\OW-ERP-SYS.exe", vbNormalFocus) : Me.Close() End If End Sub Private Sub 主程式更新_Tick(sender As Object, e As EventArgs) Handles 主程式更新.Tick Dim 已開啟 As Boolean = False : Dim FS1 As String Dim Strs As String = Application.StartupPath MyModule1.進度條() FS1 = "LANGUAGE_FILE.csv" If File.Exists(Str & "\" & FS1) Then File.Delete(Str & "\" & FS1) End If My.Computer.Network.DownloadFile(Target & FS1, Str & "\" & FS1) Me.Text = "UPDATE " & TF & FS1 FS1 = "OW-ERP-SYS.exe" If File.Exists(My.Computer.FileSystem.SpecialDirectories.Desktop & "\" & FS1) Then Dim pro() As Process = System.Diagnostics.Process.GetProcesses() ' 判斷是否有符合的Process For Each process As Process In pro If ("OW-ERP-SYS").Equals(process.ProcessName) Then 已開啟 = True End If Next If 已開啟 = False Then 主程式更新.Enabled = False MyModule1.進度條() : If File.Exists(Str & "\" & FS1) Then : File.Delete(Str & "\" & FS1) : End If My.Computer.Network.DownloadFile(Target & FS1, Str & "\" & FS1) OK1 = True : CheckBox1.Checked = True End If ElseIf File.Exists(Strs & "\" & FS1) Then Dim pro() As Process = System.Diagnostics.Process.GetProcesses() ' 判斷是否有符合的Process For Each process As Process In pro If ("OW-ERP-SYS").Equals(process.ProcessName) Then 已開啟 = True End If Next If 已開啟 = False Then 主程式更新.Enabled = False MyModule1.進度條() : If File.Exists(Str & "\" & FS1) Then : File.Delete(Str & "\" & FS1) : End If My.Computer.Network.DownloadFile(Target & FS1, Str & "\" & FS1) OK1 = True : CheckBox1.Checked = True End If End If End Sub Private Sub 刪除在下載_Tick(sender As Object, e As EventArgs) Handles 刪除在下載.Tick 刪除在下載.Enabled = False : Dim FS2 As String OK2 = True : CheckBox2.Checked = True End Sub Private Sub Timer3_Tick(sender As Object, e As EventArgs) Handles 驗證存在1.Tick '10 驗證存在1.Enabled = False Dim FS3 As String MyModule1.進度條() : If Dir(Str + "\Theme", vbDirectory) <> "" Then : Else : MkDir(Str + "\Theme") : End If OK3 = True : CheckBox3.Checked = True End Sub Private Sub Timer4_Tick(sender As Object, e As EventArgs) Handles 驗證存在2.Tick '10 驗證存在2.Enabled = False Dim FS4 As String FS4 = "OW-ERP-SYS.pdb" : MyModule1.進度條() : If File.Exists(Str & "\" & FS4) Then : Else Me.Text = "UPDATE " & TF & FS4 : My.Computer.Network.DownloadFile(Target & FS4, Str & "\" & FS4) : End If FS4 = "OW-ERP-SYS.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS4) Then : Else Me.Text = "UPDATE " & TF & FS4 : My.Computer.Network.DownloadFile(Target & FS4, Str & "\" & FS4) : End If FS4 = "OW-ERP-SYS.exe.config" : MyModule1.進度條() : If File.Exists(Str & "\" & FS4) Then : Else Me.Text = "UPDATE " & TF & FS4 : My.Computer.Network.DownloadFile(Target & FS4, Str & "\" & FS4) : End If OK4 = True : CheckBox4.Checked = True End Sub Private Sub Timer5_Tick(sender As Object, e As EventArgs) Handles 驗證存在3.Tick '10 驗證存在3.Enabled = False Dim FS5 As String FS5 = "DotNetBarcode.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS5) Then : Else Me.Text = "UPDATE " & TF & FS5 : My.Computer.Network.DownloadFile(Target & FS5, Str & "\" & FS5) : End If OK5 = True : CheckBox5.Checked = True End Sub Private Sub Timer6_Tick(sender As Object, e As EventArgs) Handles 驗證存在4.Tick '10 驗證存在4.Enabled = False OK6 = True : CheckBox6.Checked = True End Sub Private Sub Timer7_Tick(sender As Object, e As EventArgs) Handles 驗證存在5.Tick '10 驗證存在5.Enabled = False OK7 = True : CheckBox7.Checked = True End Sub Private Sub Timer8_Tick(sender As Object, e As EventArgs) Handles 驗證存在6.Tick '10 驗證存在6.Enabled = False OK8 = True : CheckBox8.Checked = True End Sub Private Sub Timer9_Tick(sender As Object, e As EventArgs) Handles 驗證存在7.Tick '3 驗證存在7.Enabled = False OK9 = True : CheckBox9.Checked = True End Sub Private Sub 刪除所有檔案_Tick(sender As Object, e As EventArgs) Handles 刪除所有檔案.Tick 刪除所有檔案.Enabled = False : Dim FS10 As String FS10 = "excel_chinese.xml" : MyModule1.進度條() : If File.Exists(Str & "\Theme\" & FS10) Then : File.Delete(Str & "\Theme\" & FS10) : End If FS10 = "excel_english.xml" : MyModule1.進度條() : If File.Exists(Str & "\Theme\" & FS10) Then : File.Delete(Str & "\Theme\" & FS10) : End If FS10 = "word_chinese.xml" : MyModule1.進度條() : If File.Exists(Str & "\Theme\" & FS10) Then : File.Delete(Str & "\Theme\" & FS10) : End If FS10 = "word_english.xml" : MyModule1.進度條() : If File.Exists(Str & "\Theme\" & FS10) Then : File.Delete(Str & "\Theme\" & FS10) : End If FS10 = "OW-ERP-SYS.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "OW-ERP-SYS.exe.config" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "OW-ERP-SYS.pdb" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.Documents.SpreadsheetStreaming.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.Documents.SpreadsheetStreaming.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.RadSpreadsheet.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.RadSpreadsheet.dll.config" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.RadSpreadsheet.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.RadDiagram.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.RadDiagram.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.RadDock.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.RadDock.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.RadMarkupEditor.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.RadMarkupEditor.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.SyntaxEditor.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.SyntaxEditor.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.UI.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.UI.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.PdfViewer.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.PdfViewer.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.RichTextEditor.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.RichTextEditor.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.ChartView.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.ChartView.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.GridView.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.GridView.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.RadMap.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.RadMap.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.RadToastNotification.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.RadToastNotification.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.RadWebCam.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.WinControls.RadWebCam.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.Windows.Documents.Core.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.Windows.Documents.Core.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.Windows.Documents.Fixed.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.Windows.Documents.Fixed.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.Windows.Documents.Spreadsheet.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.Windows.Documents.Spreadsheet.FormatProviders.Pdf.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.Windows.Documents.Spreadsheet.FormatProviders.Pdf.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.Windows.Documents.Spreadsheet.FormatProviders.Xls.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.Windows.Documents.Spreadsheet.FormatProviders.Xls.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.Windows.Documents.Spreadsheet.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.Windows.MediaFoundation.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.Windows.Zip.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Telerik.Windows.Zip.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "TelerikCommon.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "TelerikData.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "TelerikData.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "TelerikExport.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "TelerikExport.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "TelerikMetro_Chinese.tssp" : MyModule1.進度條() : If File.Exists(Str & "\Theme\" & FS10) Then : File.Delete(Str & "\Theme\" & FS10) : End If FS10 = "DotNetBarcode.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "IdentityModel.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "IdentityModel.pdb" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "IdentityModel.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "MediaFoundation.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Microsoft.Toolkit.Uwp.Notifications.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Newtonsoft.Json.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Newtonsoft.Json.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "PInvoke.Windows.Core.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "PInvoke.Windows.Core.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "SuperDataGrid.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Buffers.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Buffers.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Memory.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Memory.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Numerics.Vectors.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Numerics.Vectors.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Runtime.CompilerServices.Unsafe.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Runtime.CompilerServices.Unsafe.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Text.Encodings.Web.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Text.Encodings.Web.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Linq.Queryable.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Linq.Parallel.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Linq.Expressions.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Linq.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.IO.UnmanagedMemoryStream.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.IO.Pipes.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.IO.MemoryMappedFiles.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.IO.IsolatedStorage.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.IO.FileSystem.Watcher.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.IO.FileSystem.Primitives.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.IO.FileSystem.DriveInfo.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.IO.FileSystem.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.IO.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.IO.Compression.ZipFile.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.IO.Compression.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Globalization.Extensions.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Globalization.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Globalization.Calendars.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Dynamic.Runtime.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Drawing.Primitives.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Diagnostics.Tracing.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Diagnostics.TraceSource.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Diagnostics.Tools.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Diagnostics.TextWriterTraceListener.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "Microsoft.Win32.Primitives.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "netstandard.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.AppContext.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Collections.Concurrent.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Collections.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Collections.NonGeneric.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Collections.Specialized.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.ComponentModel.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.ComponentModel.EventBasedAsync.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.ComponentModel.Primitives.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.ComponentModel.TypeConverter.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Console.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Data.Common.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Diagnostics.Contracts.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Diagnostics.Debug.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Diagnostics.FileVersionInfo.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Diagnostics.Process.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Diagnostics.StackTrace.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Net.Http.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Net.NameResolution.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Net.NetworkInformation.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Net.Ping.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Net.Primitives.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Net.Requests.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Net.Security.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Net.Sockets.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Net.WebHeaderCollection.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Net.WebSockets.Client.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Net.WebSockets.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.ObjectModel.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Reflection.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Reflection.Extensions.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Reflection.Primitives.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Resources.Reader.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Resources.ResourceManager.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Resources.Writer.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Xml.XPath.XDocument.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Xml.XPath.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Xml.XmlSerializer.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Xml.XmlDocument.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Xml.XDocument.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Xml.ReaderWriter.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.ValueTuple.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Threading.Timer.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Threading.ThreadPool.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Threading.Thread.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Threading.Tasks.Parallel.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Threading.Tasks.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Threading.Overlapped.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Threading.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Text.RegularExpressions.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Text.Encodings.Web.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Text.Encodings.Web.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Text.Encoding.Extensions.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Text.Encoding.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Security.SecureString.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Security.Principal.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Security.Cryptography.X509Certificates.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Security.Cryptography.Primitives.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Security.Cryptography.Encoding.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Security.Cryptography.Csp.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Security.Cryptography.Algorithms.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Security.Claims.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Runtime.Serialization.Xml.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Runtime.Serialization.Primitives.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Runtime.Serialization.Json.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Runtime.Serialization.Formatters.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Runtime.Numerics.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Runtime.InteropServices.RuntimeInformation.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Runtime.InteropServices.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "ystem.Runtime.Handles.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Runtime.Extensions.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Runtime.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If FS10 = "System.Runtime.CompilerServices.VisualC.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS10) Then : File.Delete(Str & "\" & FS10) : End If OK10 = True : CheckBox10.Checked = True : 刪除完成 = True End Sub End Class