New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

electron-regedit

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-regedit

File associations, file icons & open with... for electron apps

  • 2.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
26
decreased by-80.74%
Maintainers
1
Weekly downloads
 
Created
Source

electron-regedit

File associations, file icons & open with... for electron apps

This module allows you to register your app in the windows registry, manipulate context menus & handle native open, edit, print, preview actions ect.

Installation

npm install electron-regedit

Usage

Toy Example

As a short documentation, here is how the module is used:

const {ProgId, ShellOption, Regedit} = require('electron-regedit')

new ProgId({
    description: 'My App File',
    icon: 'myicon.ico',
    extensions: ['myapp'],
    shell: [
        new ShellOption({verb: ShellOption.OPEN}),
        new ShellOption({verb: ShellOption.EDIT, args: ['--edit']}),
        new ShellOption({verb: ShellOption.PRINT, args: ['--print']})
    ]
})

Regedit.installAll()

Squirrel integration

You will need to call Regedit.installAll() and Regedit.uninstallAll() when installing/uninstalling your application to clean up the registry. If you are using Squirrel there is a helping function to handle this. It is very important that all instantions of new ProgId({...}) have been done before handling Squirrel events or installing/uninstalling into the registry.

const {Regedit} = require('electron-regedit')

//... instantiate your ProgIds

if (Regedit.squirrelStartupEvent()) return

//... the rest of your application code

Documentation

Please see the wiki for detailed information

Keywords

FAQs

Package last updated on 06 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc