windows10でプログラムから証明書をインストールする事ができない状況が発生しており困っております。
コードは以下なのですがMsgbox5に行く前にプログラムを停止しましたとなってしまいます。Windows7では問題なく動いています。
原因はどこにあるのかお教えいただけますと幸いです。
Dim mode As String = "/a" Dim filePath As String = "証明書ファイル" If Not System.IO.File.Exists(filePath) Then ' MsgBox("1") End End If MsgBox("2") Dim cert As New X509Certificate2(filePath) Dim store As New X509Store(StoreName.Root, StoreLocation.LocalMachine) MsgBox("3") Try store.Open(OpenFlags.ReadWrite) MsgBox("4") Select Case mode Case "/a" store.Add(cert) MsgBox("5") Case "/d" store.Remove(cert) Case Else End End Select Finally store.Close() End Try
回答1件
あなたの回答
tips
プレビュー