所以我有一个应用程序可以在我自己的个人计算机上以调试模式和发布模式运行。问题是,在我将它发布到 oneClick 应用程序后,它再也找不到指定的文件。
这是我的代码:
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim usr As String = TextBox1.Text
Dim pass As String = TextBox2.Text
WebBrowser1.Navigate("www.website.com/api.php?action=authenticate&username=" & usr & "&password=" & pass)
Dim Delay = 5000
System.Threading.Thread.Sleep(Delay)
Dim PageSource = WebBrowser1.DocumentText
If TextBox1.Text = "" And TextBox2.Text = "" Then
MsgBox("You have to input a valid SG Username and Password", MsgBoxStyle.Critical)
ElseIf TextBox1.Text = "" Then
MsgBox("You have to input a valid SG Username", MsgBoxStyle.Critical)
ElseIf TextBox2.Text = "" Then
MsgBox("You have to input your SG Password", MsgBoxStyle.Critical)
Else
Dim Good = "hash"
Dim Check = InStr(PageSource, Good)
If Check > 0 Then
**System.Diagnostics.Process.Start("Run.bat")**
Else
MsgBox("Incorrect Username/Password", MsgBoxStyle.Critical)
TextBox2.Text = ""
Delay = Delay + 2000
TextBox2.Select()
End If
End If
End Sub
End Class
我在 /bin/release 文件夹中有三个额外的文件。要运行的文件、应用程序和要执行的 Run.bat。该应用程序是一种在有效登录时执行文件的表单。我的问题是为什么它在发布之前找不到要运行的文件,但之后却找不到?有没有办法在某种包含中进行编码?