Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tympanix/electron-regedit
File associations, file icons & open with... for electron apps
https://github.com/tympanix/electron-regedit
electron electron-regedit file-icons icons registry squirrel windows windows-registry
Last synced: 4 months ago
JSON representation
File associations, file icons & open with... for electron apps
- Host: GitHub
- URL: https://github.com/tympanix/electron-regedit
- Owner: tympanix
- Created: 2017-01-19T20:58:41.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-11-10T17:53:20.000Z (about 2 years ago)
- Last Synced: 2024-04-16T22:22:37.141Z (10 months ago)
- Topics: electron, electron-regedit, file-icons, icons, registry, squirrel, windows, windows-registry
- Language: JavaScript
- Homepage:
- Size: 76.2 KB
- Stars: 35
- Watchers: 3
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# electron-regedit
File associations, file icons & open with... for electron appsThis module allows you to register your app in the windows registry, manipulate context menus & handle native open, edit, print, preview actions ect.
## Installation
```shell
npm install electron-regedit
```## Usage
### Toy Example
As a short documentation, here is how the module is used:
```javascript
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.
```javascript
const {Regedit} = require('electron-regedit')//... instantiate your ProgIds
if (Regedit.squirrelStartupEvent()) return
//... the rest of your application code
```# Documentation
Please see the [wiki](https://github.com/Tympanix/electron-regedit/wiki) for detailed information