Run exe from MS CRM 4.0

If you are looking to run .exe from MS CRM 4.0, then you can do this easily. You can create a ISV button on MS CRM form and create on global function on formonload can call it in ISV button JS.. you can write below code to run .exe

var _Object=new ActiveXObject( “WScript.Shell” ) ;
_Object.Run(“C:\\WINDOWS\\system32\\calc.exe” );

 you can also pass parameters with Run command.

Enjoy !!!


Filed under JS Script, MS CRM 4.0

4 responses to “Run exe from MS CRM 4.0

  1. mohsinkhan

    hi mahender,
    I want execute the exe file which is a windows application in crm 2011 form ribbon button. how can i do that.

  2. mohsinkhan

    I created a button in ribbon and added a javascript function in action tab.
    I wrote the function and stored it as webresource.
    here is the function what i added webrsource js.
    function run()
    var w = new
    _w.Run(“../abc/abc1/app1.exe” );

  3. mohsinkhan

    Hi mahender
    Thanks it is working as you said.
    but path is in local machine. I need to install the exe in all machines if i use the code you provided. I want to allow all users to use the application on click of button.If i install appplication in server also only in server machine i am able to use the application. How can i solve the problem.
    Waiting for reply

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s