Han Qiao

Hi,

I got 3 questions:
1. Is there a way to detect installed application on the client system remotely
2. Is there a way to launch the installed application on the client system remotely
3. Is there a way to detect and determine what application is currently being opened on the system locally

For the 1st and 2nd, I'm thinking of sending the byte consist of the application list through network, but is there any other ways around that is more convinience

Thanks in advance.




Re: .NET Framework Networking and Communication Application Control

Mike Flasko

For #1 and #2, check out the March 2007 CTP of the .Net Framework. In the CTP you will find a new namespace called System.Net.PeertoPeer.Collaboration. Please check out the application invite feature - it relies on applications being registered with the PeertoPeer infrastructure.

Another option (atleast for #1) may be to use WMI -- I'm not sure if it is possible, you would need to do some searching.






Re: .NET Framework Networking and Communication Application Control

Adam Wayne

You should be able to accomplish all 3 through WMI.

#1 - Look at the Win32_Product class (http://msdn2.microsoft.com/en-us/library/aa394378.aspx). This should provide you a list of applications that are installed (equivalent to what should be in Add/Remove Programs). You can use the System.Management objects to query for all the Win32_Product instances on a remote machine. You should also be able to use the associated software-related classes (http://msdn2.microsoft.com/en-us/library/aa390887.aspx) to get information about the application, such as where it is installed.

#2 - You can use the Win32_Process class's Create method (http://msdn2.microsoft.com/en-us/library/aa389388.aspx) to launch a new process.

#3 - Look at the Win32_Process class (http://msdn2.microsoft.com/en-us/library/aa394372.aspx). This will give you information about the processes currently running on a machine. You can use the System.Management objects to query for all the Win32_Process instances on a machine, or you can query for a specific process name if you wanted to see if a specific application was running.

WMI will require the provider be installed on the remove machine and that you have access to the machine (you can use a username/password to authenticate). If you haven't used the System.Management classes in .NET yet, a simple search on "wmi c#" should point you in the right direction. This article from csharphelp.com should get you started in the right direction.

Hope this helps!





Re: .NET Framework Networking and Communication Application Control

Han Qiao

for the #1: i had used System.Management object to list out the local installed application (i tried locally first) at Uninstall registry.

for the #2: I searched that i can use Process.Start(application path); But the problem is that i do not know of the application path.
I tried Windows' Run program. It can run a program just by entering the application name *.exe.
If that is how i should run it, how can i relate the application name with the list of installed application

No offence but Im reluctant to use fully wmi for remote connection, cause it needs admin authentication. And it is really not user friendly to ask user to enter authentication for each execution of program remotely. Or even put is at a admin setting. We would like to put minimum input for user as user might not really IT savvy.

thanks in advance