aboutsummaryrefslogtreecommitdiff
path: root/index.cc
diff options
context:
space:
mode:
Diffstat (limited to 'index.cc')
-rw-r--r--index.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/index.cc b/index.cc
index 59e359d..9c6a0f2 100644
--- a/index.cc
+++ b/index.cc
@@ -263,11 +263,16 @@ void isUserAdmin(const v8::FunctionCallbackInfo<Value>& args) {
args.GetReturnValue().Set(Boolean::New(isolate, _isUserAdmin()));
}
+void resetIconCache(const v8::FunctionCallbackInfo<Value>& args) {
+ SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);
+}
+
void Init(Handle<Object> exports) {
NODE_SET_METHOD(exports, "deelevate", deelevate);
NODE_SET_METHOD(exports, "elevate", elevate);
NODE_SET_METHOD(exports, "getSystem32Path", GetSystem32Path);
NODE_SET_METHOD(exports, "isUserAdmin", isUserAdmin);
+ NODE_SET_METHOD(exports, "resetIconCache", resetIconCache);
}
NODE_MODULE(winutils, Init)