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"

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

    Saturday, June 7, 2014 7:47 PM


All replies

  • Make sure you are using the full path where the setup.exe is located.  If this doesn't work then use for the command name cmd.exe and make the setup.exe full pathname the parameter to the cmd.exe process.


    Sunday, June 8, 2014 11:54 AM
  • Thanks for your response.

    I am using the full path for the setup.exe. 

    Could you please provide me sample code for using cmd.exe to invoke my setup.exe application installer.

    For your kind information my code i mention in the first thread is working fine on application debug mode... but the same is failed when i double click the exe.

    Sunday, June 8, 2014 5:15 PM
  • See webpage below.   The method OpenWithArguments().



    Monday, June 9, 2014 6:46 AM