Reputation: 87
I am trying to calling exe from chrome extension. I googled and come to know that It is possible from NPAPI plugins only. I also got the impression that it can be write only in c /c++ (which i dont know.). Can anybody help me on NPAPI plugins.
If its possible to build in visual studio using c# or vb.net.
Manifest.Json file
{
"name": "My First Extension",
"version": "1.0",
"manifest_version": 2,
"description": "The first extension that I made.",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "MyPage.html"
},
"permissions": [
"MyPage.html"
]
}
MyPage.html file
<html>
<head>
<script src="my.js"></script>
<script language="JavaScript" type="text/javascript" > </script>
</head>
<body>
</body>
</html>
my.js file
window.onload = function()
{
RunExe();
};
function RunExe()
{
MyObject = new ActiveXObject( "WScript.Shell" )
MyObject.run ("file:///C:/Users/manoj.gangwar/Desktop/FormEx_Sample_Project/TestProject/bin/Debug/TestForm.exe");
window.close();
}
Thanks and Regards Manoj
Upvotes: 0
Views: 1218
Reputation: 14324
No, there is no way to create a browser plugin in .net without knowing C++. It might be possible to make something in C++ that would act as a bridge to allow .net assemblies to behave as a plugin, but to the best of my knowledge nobody has created such a thing.
Upvotes: 1