How to save registry key to a file
问题 I am trying to save the registry key to file using the below API, but save failed. String key = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\My App"; String fileName = "myapp.reg"; WinRegistry.saveKey(RegistryRoot.HKEY_LOCAL_MACHINE, key, fileName); Registry key snippet [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\\my app] "DisplayName"="my app" "DisplayIcon"="C:\\myapp\\.install4j\\installer.ico" "UninstallString"="\"C:\\myapp\\uninstall.exe\""