Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
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.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Unknown ExecutionEngineException

Reply
 
Old 09-11-2009   #1 (permalink)
yoovals


 
 

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 SpecsSystem Spec
Reply

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


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46