cmd 관리자 권한으로 실행
*
Dim process As System.Diagnostics.Process = Nothing
Dim processStartInfo As System.Diagnostics.ProcessStartInfo
processStartInfo = New System.Diagnostics.ProcessStartInfo
processStartInfo.FileName = fileToExecute
processStartInfo.Verb = "runas"
processStartInfo.Arguments = ""
processStartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal
processStartInfo.UseShellExecute = True
Try
process = System.Diagnostics.Process.Start(processStartInfo)
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Finally

If Not (process Is Nothing) Then
process.Dispose()
End If

End Try
processStartInfo.Verb = "runas"

이 게시물을

공유하기

SEARCH

MENU NAVIGATION