In my application, I need to run a batch file as admin for it to function.
I'm using this so far but I cant remember how to use the runas feature which allows it to run with admin rights.
process.start("filelocation.bat")
Any help would be apreciated.
'nice examples. just adding namespaces
You could try with this code:
This code will ask the Administrator password and the start the execution of your batch file
EDIT: This is an alternative without the cmd window
It's a little more complicated because you need to get the input values (userName, Password, domain) before using this code and the password is a SecureString that you need to build in a dedicated way