I have to open a CMD with administrator previlege by CMD command . So i try this code and then It asks for password but how can i provide the password in the same process. And then I have to catch the newly opened CMD.
Process p = Runtime.getRuntime().exec("runas /noprofile /user:Partha >fg.txt")
p.waitFor();
p=Runtime.getRuntime().exec("password");
p.waitFor();