Shoutbox

Run .exe with Windows Live Messenger - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: Run .exe with Windows Live Messenger (/showthread.php?tid=67227)

Run .exe with Windows Live Messenger by paul_a on 10-12-2006 at 07:29 AM

Hi all,

I have written my own messenger plugin using IMessenger interface, and i would like this plugin to start automatically when Windows Live Messenger starts . Is there a way to start up my exe with Messenger?

Thnx


RE: Run .exe with Windows Live Messenger by vikke on 10-12-2006 at 08:29 AM

This is really advanced.

The only way I know is to create a Proxy Dll.
Just copy all functions from a Dll that Messenger uses, then put it in Messenger's Directory, and Messenger loads your instead of the real one.
Just redirect the calls to the real Dll, in the DllMain put your code which runs the exe.


RE: Run .exe with Windows Live Messenger by foaly on 10-12-2006 at 10:02 AM

If you just have to start the exe, you can write a simple script and use the run command to start it...


RE: Run .exe with Windows Live Messenger by Delphi Thunderbolt on 10-14-2006 at 11:28 PM

ShellExecute is capable of doing this, and although I don't script in Plus, I'm sure you can call the DLL and use it as a procedure. ShellExecute might be a Delphi procedure, I'm not entirely sure.

ShellExecute is a function that opens a file to it's default program. So using ShellExecute on a .mp3 file will open that .mp3 file in the assigned media player (Windows Media Player for example).


RE: Run .exe with Windows Live Messenger by paul_a on 10-16-2006 at 09:08 AM

Hello again,

Is there a way to call something like shellExecute() from the Csharp code i wrote for a WLM addin. For example, can i call it from the initialize function below thnx.

using System;
using System.Diagnostics;
using Microsoft.Messenger;
using System.Windows.Forms;


public class AddIn : IMessengerAddIn
    {
       
        MessengerClient m_client;
     
void IMessengerAddIn.Initialize(MessengerClient client)
        {
           
            m_client = client;
                 
        }
      .
      .
      .
      .
}


RE: Run .exe with Windows Live Messenger by vikke on 10-16-2006 at 09:40 AM

Read about pInvoke, ShellExecute, I think it's Kernel32.dll or User32.dll.


RE: Run .exe with Windows Live Messenger by Stigmata on 10-16-2006 at 09:47 AM

quote:
Originally posted by paul_a

Hello again,

Is there a way to call something like shellExecute() from the Csharp code i wrote for a WLM addin. For example, can i call it from the initialize function below thnx.



the messenger addin api wont allow you to launch any type file..

The sandbox it is made in will not allow it.
RE: Run .exe with Windows Live Messenger by vikke on 10-16-2006 at 10:11 AM

Well.. Trash the sandbox! Check Mess.be for how to remove it.


RE: Run .exe with Windows Live Messenger by Stigmata on 10-16-2006 at 10:37 AM

quote:
Originally posted by vikke
Well.. Trash the sandbox! Check Mess.be for how to remove it.


yes i do no how to bypass it

it is done by changing the security settings for the dll.

Personally i wouldnt bother, there are plenty of things you can do within the api wrapper without having to open external programs. What exe are you trying to include? Could you possibly re-write it into your dll?

Regardless, for c# its

system.diagnostics.process.start ("path to file")

or is that vb.net :S blah should work anyway :D
RE: Run .exe with Windows Live Messenger by Delphi Thunderbolt on 10-17-2006 at 06:07 AM

quote:
Originally posted by Stigmata
quote:
Originally posted by paul_a

Hello again,

Is there a way to call something like shellExecute() from the Csharp code i wrote for a WLM addin. For example, can i call it from the initialize function below thnx.



the messenger addin api wont allow you to launch any type file..

The sandbox it is made in will not allow it.

Ah, I can see why.
Stops idiots from writing plug-ins that download and execute viruses without the user knowing.

Sharp idea. No pun intended.