Search code examples
npapibrowser-plugindllregistration

Register NPAPI Plugins


i try to register an own NPAPI Plugin, but i dont found informations about that.

I know that the NPAPI on Chrome is deprecated (i will write a PPAPI Plugin later) but Chrome-Docs says that i must use a manifest.json (See https://developer.chrome.com/extensions/npapi). But how i register it?

Following i had try:

Over an BATCH-File (register.bat):

 regsvr32.exe /s "C:\Users\Bizzi\Desktop\WoRPG Plugin\npworpg\Release\npworpg.dll"
 pause

Directly in the Registry:

HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins\
    [worpg.de/WoRPG]
        Description  REG_SZ   World of RPG Browser Plugin
        Path         REG_SZ   C:\Users\Bizzi\Desktop\WoRPG Plugin\npworpg\Release\npworpg.dll
        ProductName  REG_SZ   World of RPG Plug-In
        Vendor       REG_SZ   World of RPG
        Version      REG_SZ   1.0.0

        [MimeTypes]
            [application/x-worpg-launcher]
                Description  REG_SZ   World of RPG

Solution

  • The solution is very simple!

    Be sure what the depency the browser have. If the browser an 64bit based browser, be sure that the registry entry is set:

    Chrome (32bit): KEY_LOCAL_MACHINE\SOFTWARE\Google\Chrome\Extensions

    Chrome (64bit): KEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Google\Chrome\Extensions

    Firefox (32bit): KEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins

    Firefox (64bit): KEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MozillaPlugins

    Here is a little .reg script:

    Windows Registry Editor Version 5.00
    
    ; MOZILLA 32bit
    [HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins\@worpg.de/npworpg,version=1.0.0]
    "Description"="World of RPG Browser Plugin"
    "Path"="C:\\Program Files (x86)\\World of RPG\\plugins\\npworpg.dll"
    "ProductName"="npworpg"
    "Vendor"="World of RPG"
    "Version"="1.0.0"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins\@worpg.de/WoRPG,version=1.0.0\MimeTypes]
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins\@worpg.de/WoRPG,version=1.0.0\MimeTypes\application/x-worpg-launcher]
    "Description"="World of RPG"
    
    ; MOZILLA 64bit
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MozillaPlugins\@worpg.de/npworpg,version=1.0.0]
    "Description"="World of RPG Browser Plugin"
    "Path"="C:\\Program Files (x86)\\World of RPG\\plugins\\npworpg.dll"
    "ProductName"="npworpg"
    "Vendor"="World of RPG"
    "Version"="1.0.0"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MozillaPlugins\@worpg.de/WoRPG,version=1.0.0\MimeTypes]
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MozillaPlugins\@worpg.de/WoRPG,version=1.0.0\MimeTypes\application/x-worpg-launcher]
    "Description"="World of RPG"
    
    ; CHROME 32bit
    [HKEY_LOCAL_MACHINE\SOFTWARE\Google\Chrome\Extensions\ckpknilfoflolaglllnonhhhnfhaidom]
    "Path"="C:\\Program Files (x86)\\World of RPG\\plugins\\npworpg.dll"
    "Version"="1.0.0"
    
    ; CHROME 64bit
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Google\Chrome\Extensions\ckpknilfoflolaglllnonhhhnfhaidom]
    "Path"="C:\\Program Files (x86)\\World of RPG\\plugins\\npworpg.dll"
    "Version"="1.0.0"