Created
May 7, 2017 13:32
-
-
Save fasterthanlime/b85801149e409770b23d331c282002c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const {Key, registry, windef} = require("windows-registry"); | |
| let key; | |
| try { | |
| const path = "SOFTWARE\\Wow6432Node\\Microsoft\\XNA\\Framework\\v4.0"; | |
| key = registry.openKeyFromPredefined(windef.HKEY.HKEY_LOCAL_MACHINE, path, windef.KEY_ACCESS.KEY_QUERY_VALUE); | |
| const valBuf = registry.queryValueForKeyObject(key, "Refresh1Installed"); | |
| console.log("RefreshInstalled", valBuf.readInt32LE()); | |
| } finally { | |
| if (key && key.handle) { | |
| key.close(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment