Quantcast
Viewing all articles
Browse latest Browse all 8156

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

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. 


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>