Skip to content

Commit 85dc0bc

Browse files
author
Steven Edouard
committed
Merge pull request #5 from CatalystCode/doc_file_assc
doc(README) - docs on file assc
2 parents 680a3c7 + 41e370e commit 85dc0bc

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ required. Then install the package:
1111
npm install windows-registry-node
1212
```
1313

14+
## Creating File Associations
15+
16+
To create a file association you can call the `fileAssociation.associateExeForFile` api which will make windows assign a default program for
17+
an arbitrary file extension:
18+
19+
```js
20+
fileAssociation.associateExeForFile('myTestHandler', 'A test handler for unit tests', 'C:\\path\\to\\icon', 'C:\\Program Files\\nodejs\\node.exe %1', '.zzz');
21+
```
1422
## Reading / Writing to the Windows Registry
1523

1624
This library implements only a few of the basic registry commands, which allow you to do basic CRUD
@@ -60,4 +68,8 @@ To write a value, you'll again need a [Key](lib/key.js) object and just need to
6068

6169
```js
6270
registry.setValueForKeyObject(key, 'test_value_name', windef.REG_VALUE_TYPE.REG_SZ, 'test_value');
63-
```
71+
```
72+
73+
## More Docs?
74+
75+
Make your way over to the [tests section](test) to see how the module is used.

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ module.exports = {
33
error: require('./lib/error'),
44
types: require('./lib/types'),
55
windef: require('./lib/windef'),
6-
Key: require('./lib/key')
7-
}
6+
Key: require('./lib/key'),
7+
fileAssociation: require('./lib/file_association')
8+
};

0 commit comments

Comments
 (0)