none
How to start a process with administrator accounts using vb.net programing RRS feed

  • Question

  • Hi Friend,

    I am having some problem with excuting a setup.exe file using Process.Start in Vb.Net.

    I am using Process methods to invoke the setup.exe files. The setup.exe will executed successfully my application run on Admin account, but the execution failed if my application run on Local System account. 

    I have enable the Verb property value as "runas" for the process. But still my application is not executing the setup.exe. But the same is working on Debug mode correctly...

    I have attached the code for more clarity... Please any correct me..

        Dim process As New Process()
                process.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
                process.StartInfo.FileName = storedfilename
                process.StartInfo.UseShellExecute = True
                process.StartInfo.Verb = "runas"
                process.Start()
                process.WaitForExit()

    Please let me know if you need any information regarding this code. 

    Saturday, June 7, 2014 7:47 PM

Answers

All replies