![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Unknown ExecutionEngineException We wrote an application called RemoteLauncher, which runs specified application on a remote computer under the specified user name and password. Its relevant code is as follows: ConnectionOptions co = new ConnectionOptions(); co.Username = args[2]; co.Password = args[3]; ManagementScope mgmtScope = new ManagementScope("\\\\" + args[0] + "\\root\\ cimv2", co); ManagementPath mgmtPath = new ManagementPath("Win32_Process"); ManagementClass procClass = new ManagementClass(mgmtScope, mgmtPath, null); object[] inArgs = new object[] {args[1], null, null, 0}; procClass.InvokeMethod("Create", inArgs); if (args[4].ToLower() == "t") { pId = Convert.ToInt32(inArgs[3]); Console.WriteLine("Waiting for process to stop..."); try { while (System.Diagnostics.Process.GetProcessById(pId, args[0]) != null) { Thread.Sleep(100); } } catch { Console.WriteLine("Finished!"); Thread.Sleep(1000); } } We use an application to execute the RemoteLauncher, using the following code: myProcess.StartInfo.FileName = @"K:\exe_debug\sysctrl\RemoteLauncher.exe"; myProcess.StartInfo.Arguments = compname + " ipconfig/flushdns administrator passw0rd t t"; myProcess.StartInfo.CreateNoWindow = false; myProcess.StartInfo.ErrorDialog = true; myProcess.StartInfo.UseShellExecute = true; myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal; myProcess.StartInfo.RedirectStandardOutput = false; myProcess.Start(); myProcess.WaitForExit(); When this application runs under a 'regular' user everything works OK. But, when this application runs under the system user (using a service), we get ExecutionEngineException in the RemoteLauncher application. The debugger points to the 'InvokeMethod' statement. Any idea? |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| UNKNOWN ERROR WHEN IT SAY UNKNOWN ERROR HAS OCCURRED | Vista mail | |||
| Unknown | Vista General | |||
| DEVICE UNKNOWN | Vista hardware & devices | |||
| unknown | Vista mail | |||
| Unknown device | Vista hardware & devices | |||