Read/write to Windows registry using Java

前端 未结 24 1610
日久生厌
日久生厌 2020-11-21 05:45

How is it possible to read/write to the Windows registry using Java?

24条回答
  •  一向
    一向 (楼主)
    2020-11-21 06:29

    You can execute these "REG QUERY" command using java code.

    Try to execute this from command prompt and execute command from java code.

    HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion"

    To Search details like productname version etc.. use /v amd "name".

    HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "ProductName"

提交回复
热议问题