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

Lucas Jellema

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


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.


Next Post

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

Facebook0TwitterLinkedinOur 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 […]