提升管理员权限貌似只能重新启动新进程来实现
Dim proc As New ProcessStartInfo proc.UseShellExecute = True proc.WorkingDirectory = Environment.CurrentDirectory proc.FileName = Application.ExecutablePath proc.Verb = "runas" Try Process.Start(proc) Catch End Try
http://support.microsoft.com/kb/981778
微软示例:https://code.msdn.microsoft.com/VBUACSelfElevation-39b7606f
时间: 2024-10-29 19:10:41