Programmatically extract key and value from Windows registry using simple Dos command line statement

Lucas Jellema
0 0
Read Time:34 Second

The Windows Registry can be inspected from a Dos (Command Prompt) command. The key and data element I was looking for is:

Key Name: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe

Data Name: Path

SNAGHTML3c07b2b

The OS command we can use to extract the value of this entry:

REG QUERY “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe” /S /v Path

The result from this command looks like this:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe
     Path    REG_SZ    C:\Program Files (x86)\Google\Chrome\Application
End of search: 1 match(es) found.

image

 

About Post Author

Lucas Jellema

Lucas Jellema, active in IT (and with Oracle) since 1994. Oracle ACE Director and Oracle Developer Champion. Solution architect and developer on diverse areas including SQL, JavaScript, Kubernetes & Docker, Machine Learning, Java, SOA and microservices, events in various shapes and forms and many other things. Author of the Oracle Press book Oracle SOA Suite 12c Handbook. Frequent presenter on user groups and community events and conferences such as JavaOne, Oracle Code, CodeOne, NLJUG JFall and Oracle OpenWorld.
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %
Next Post

Executing command line scripts from the Oracle Forms client - using WebUtil

Our challenge: we are building the new ERP system – a pure HTML5 browser based application in Oracle ADF. This application replaces the current Oracle Forms based application. For more than a year and a half – the users will have a hybrid situation on their hands: some of their […]
%d bloggers like this: