What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Run .exe with Windows Live Messenger

Run .exe with Windows Live Messenger
Author: Message:
paul_a
Junior Member
**


Posts: 17
Joined: Aug 2006
O.P. Run .exe with Windows Live Messenger
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
10-12-2006 07:29 AM
Profile E-Mail PM Find Quote Report
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
31 / Male / Flag
Joined: May 2006
RE: Run .exe with Windows Live Messenger
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.
10-12-2006 08:29 AM
Profile E-Mail PM Find Quote Report
foaly
Senior Member
****

Avatar

Posts: 718
Reputation: 20
38 / Male / Flag
Joined: Jul 2006
RE: Run .exe with Windows Live Messenger
If you just have to start the exe, you can write a simple script and use the run command to start it...
10-12-2006 10:02 AM
Profile E-Mail PM Find Quote Report
Delphi Thunderbolt
Junior Member
**

Avatar
The insane developer

Posts: 53
Reputation: 1
35 / Male / –
Joined: Sep 2004
RE: Run .exe with Windows Live Messenger
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).

This post was edited on 10-14-2006 at 11:30 PM by Delphi Thunderbolt.
[Image: thundtacuserbar.gif]

It's my freedom, it's my duty, it's my war.

The day will go dark and quiet as the mighty Thunderbolts announce the end of the world...
10-14-2006 11:28 PM
Profile E-Mail PM Web Find Quote Report
paul_a
Junior Member
**


Posts: 17
Joined: Aug 2006
O.P. RE: Run .exe with Windows Live Messenger
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;
                 
        }
      .
      .
      .
      .
}
10-16-2006 09:08 AM
Profile E-Mail PM Find Quote Report
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
31 / Male / Flag
Joined: May 2006
RE: Run .exe with Windows Live Messenger
Read about pInvoke, ShellExecute, I think it's Kernel32.dll or User32.dll.
10-16-2006 09:40 AM
Profile E-Mail PM Find Quote Report
Stigmata
Veteran Member
*****



Posts: 3520
Reputation: 45
21 / Other / Flag
Joined: Jul 2003
RE: Run .exe with Windows Live Messenger
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.
10-16-2006 09:47 AM
Profile PM Web Find Quote Report
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
31 / Male / Flag
Joined: May 2006
RE: Run .exe with Windows Live Messenger
Well.. Trash the sandbox! Check Mess.be for how to remove it.
10-16-2006 10:11 AM
Profile E-Mail PM Find Quote Report
Stigmata
Veteran Member
*****



Posts: 3520
Reputation: 45
21 / Other / Flag
Joined: Jul 2003
RE: Run .exe with Windows Live Messenger
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
10-16-2006 10:37 AM
Profile PM Web Find Quote Report
Delphi Thunderbolt
Junior Member
**

Avatar
The insane developer

Posts: 53
Reputation: 1
35 / Male / –
Joined: Sep 2004
RE: Run .exe with Windows Live Messenger
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.
[Image: thundtacuserbar.gif]

It's my freedom, it's my duty, it's my war.

The day will go dark and quiet as the mighty Thunderbolts announce the end of the world...
10-17-2006 06:07 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On