» An ultimate catalog of computer data
Forum posts for mmc.exe
run mmc.exe services.msc ' from iis
http://www.lansweeper.com/ has features that let user do some actions such as Remote Computer management and etc from web application. i need to deploy it in my Aspnet c# web application. i do it by the code blow when i build my project it works but when i trying to run it from IIS it doesn't works, just nothing happend.
any help and idea please.
no error encountered
protected void lnkComputermanagement_Click(object sender, EventArgs e)
{
try
{
long InfoID = Convert.ToInt64(txtInfoID.Text);
IBAPanel.NetworkSupport.WMIInfo WMIInfo = new IBAPanel.NetworkSupport.WMIInfo();
WMIInfo = WMIInfo.Get(Convert.ToInt32(InfoID));
string ComName = WMIInfo.ComputerName1;
string Pass = WMIInfo.Password;
if (WMIInfo.UserName != '' && WMIInfo.ComputerName1 != '' && WMIInfo.Password!='')
{
string Usname = WMIInfo.UserName.Substring(2);
ProcessStartInfo startInfo = new ProcessStartInfo();
Process myprocess = new Process();
myprocess.StartInfo.CreateNoWindow = true;
myprocess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
myprocess.StartInfo.UseShellExecute = false;
myprocess.StartInfo.Verb = 'runas';
myprocess.StartInfo.FileName = 'cmd.exe';
myprocess.StartInfo.UserName = Usname;
myprocess.StartInfo.Password = MakeSecureString(Pass);
myprocess.StartInfo.Arguments = '/C mmc.exe compmgmt.msc /computer:' + ComName;
myprocess.Start();
myprocess.Close();
}
Response.Redirect('content.aspx?lan=fa&gid=524&InfoID=' + InfoID);
ActionJquery();
}
catch (Exception ex)
{
System.Text.StringBuilder cstext1 = new System.Text.StringBuilder();
cstext1.Append(' $(document).ready(function () {');
cstext1.Append('alert(' + ex.Message + ') ');
cstext1.Append(' }); ');
Page.ClientScript.RegisterStartupScript(typeof(Page), '', cstext1.ToString(), true);
}
Sincerely yours.
View complete forum thread with replies
Other posts related to mmc.exe
See Related Forum Messages: Follow the Links Below to View Complete Thread
CreateProcessWithLogonW and mmc.exe
Getting hwnd of MMC.exe started by ShellExecuteEX
run mmc.exe services.msc ' from iis
How to get the process running in the task manager using Install Shield
Access Certificate Store from LocalService Account
How can I access windows root certificate authorities certificates with Delphi?