0
我想從我的exe文件複製到臨時文件夾,並從那裏執行新的副本,但是我的「Load Calculator.exe」正在複製沒有問題,但沒有執行它(通過我意思Process.Start
)嵌入式資源複製但沒有運行
Dim FileName As String = IO.Path.Combine(IO.Path.GetTempPath, "Load Calculator INTL.exe")
Dim BytesToWrite() As Byte = My.Resources.Load_Calculator_INTL
Dim FileStream As New System.IO.FileStream(FileName, System.IO.FileMode.OpenOrCreate)
Dim BinaryWriter As New System.IO.BinaryWriter(FileStream)
BinaryWriter.Write(BytesToWrite)
BinaryWriter.Close()
FileStream.Close()
Process.Start(FileName)
'keepInvisible = False
'Me.Visible = True
Me.Close()
_你遇到什麼錯誤?_ –
雖然是複製到臨時文件夾而沒有運行臨時文件夾中的進程,但沒有什麼奇怪的東西? – TM80
它沒有運行這個過程嗎?或者它運行的過程,但不是從臨時文件夾? – DrDonut