praveen1981
asked on
Command execution
Hi,
I am having the following command which needs to be execute through the .net application
C:\Windows\System32\inetsr v> appcmd set app "Default Web Site/TestTwo" /applicationPool:"Classic. NetAppPool "
I used the above command as follows
protected void Button1_Click(object sender, EventArgs e)
{
string command = string.Format(@"/C C:\Windows\System32\inetsr v> appcmd set app "Default Web Site/TestTwo" /applicationPool:"Classic. NetAppPool ");
ProcessStartInfo cmdsi = new ProcessStartInfo("cmd.exe" );
cmdsi.Arguments = command; Process cmd = Process.Start(cmdsi);
}
but it is not working, can you guide what went wrong.
I am having the following command which needs to be execute through the .net application
C:\Windows\System32\inetsr
I used the above command as follows
protected void Button1_Click(object sender, EventArgs e)
{
string command = string.Format(@"/C C:\Windows\System32\inetsr
ProcessStartInfo cmdsi = new ProcessStartInfo("cmd.exe"
cmdsi.Arguments = command; Process cmd = Process.Start(cmdsi);
}
but it is not working, can you guide what went wrong.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER