starting a program on a remote machine in wmi, but also opening the apps window (in c#)

I’ve browsed page after page after page of data on the web and everyone seems to say that you cannot have an executable remotely execute an application on another machine via WMI and have the window of that application display.

Does anyone know a way around this?

I have tried created 2 executables. 1 executable uses the Process class and simply starts an executable. Here’s the code:

 class Program
      static void Main( string[ ] args )
           ProcessStartInfo startInfo = new ProcessStartInfo();
           startInfo.CreateNoWindow = false;
           startInfo.UseShellExecute = false;
           startInfo.FileName = "C:\\folder\\Mexe.exe";
           startInfo.WindowStyle = ProcessWindowStyle.Normal;
           Process p = Process.Start( startInfo );

This executable resides on the remote machine.

I have another executable that will be on the client’s machine. This exe uses WMI in C# to remotely execute the application on the server via the commandline. I get a return code of 0. Nothing happens on the server.

Any ideas what I might be doing wrong?

I’ve also thought about creating a scheduled task in task scheduler on the server, but leaving the task disabled.

Anyone have an idea what the C# code would be to have a WMI application kick off this task? Would there be a way to discern whether the task/application started finished?

egrep search for whitespace

I’m trying to use egrep with a regex pattern to match whitespace.

I’ve used RegEx with Perl and C# before and they both support the pattern \s to search for whitespace. egrep (or at least the version I’m using) does not seem to support this pattern.

In a few articles online I’ve come across a shorthand [[:space:]], but this does not seem to work. Any help is appreciated.

Using: SunOS 5.10