有効にしたり無効にできるアップデートチェッカーの設定に取り組んでいます。 設定を有効にすると、 "UA.set"というファイルが作成されます ファイルUA.setファイルが存在するかどうかをチェックするコードに更新チェックメッセージを組み込みましたが、私は動作しません。 マビはこの問題を手伝ってくれますか?VB.Net SpecialFolder.ApplicationDataが動作しません。
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Dim filePath As String
filePath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\MozarCodes\DuckyTool2\Settings"
Dim objFSO, strFile
strFile = "filePath\UA.set"
objFSO = CreateObject("Scripting.FileSystemObject")
If Not objFSO.FileExists(strFile) Then
Dim url As New System.Uri("http://mozarcodes.netne.net/DT2-1/")
Dim req As System.Net.WebRequest
req = System.Net.WebRequest.Create(url)
Dim resp As System.Net.WebResponse
Try
resp = req.GetResponse()
resp.Close()
req = Nothing
MsgBox("Update Found! Please update to our latest version on http://mozarcodes.netne.net/")
Catch ex As Exception
req = Nothing
MsgBox("You are now using the latest version of DuckyTool 2!")
End Try
End If
Threading.Thread.Sleep("1")
End Sub
ありがとうございました!
何がうまくいかない?何が問題ですか? – David
ファイルが存在しない場合、それでも私にMsgBoxが与えられます – Luseres
_strFile = "filePath \ UA.set" _これは単なる_strFile = filePath& "UA.set"ではありませんか?_ – Steve