Hi All,
Inspired by http://www.vbforums.com/showthread.php?t=420404, I was wondering if there is a way to grant Administrator access to a Process?
I have the following code:
VB Code:
Dim p As New Process Dim psi As New ProcessStartInfo("defrag.exe") psi.Arguments = drv p.StartInfo = psi p.Start() p.WaitForExit()
The problem is defrag.exe cannot be run under Limited User.
Therefore as a workaround, I have
in Form Load.VB Code:
btnDefrag.Enabled = My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator)
It would be great if I could make the Form prompt for Administrator user/pass to start the process. Am I imagining things or is this possible in .NET?![]()
Thanks guys!
McoreD




Reply With Quote