Interface Win32RegistryAccessor


  • public interface Win32RegistryAccessor
    Provides access to windows registry. This interface is registered in Spring.
    Since:
    5.1
    • Method Detail

      • readRegistryText

        @Nullable
        java.lang.String readRegistryText​(@NotNull
                                          Win32RegistryAccessor.Hive hive,
                                          @NotNull
                                          Bitness bitness,
                                          @NotNull
                                          java.lang.String keyPath,
                                          @NotNull
                                          java.lang.String entryName)
        Tries to read registry
        Parameters:
        hive - hive to look into
        bitness - registry branch - x32 or x64.
        keyPath - path to read.
        entryName - key to read
        Returns:
        read value or null
      • readRegistryFile

        @Nullable
        java.io.File readRegistryFile​(@NotNull
                                      Win32RegistryAccessor.Hive hive,
                                      @NotNull
                                      Bitness bitness,
                                      @NotNull
                                      java.lang.String keyPath,
                                      @NotNull
                                      java.lang.String entryName)
        Tries to read registry
        Parameters:
        hive - hive to look into
        bitness - registry branch - x32 or x64.
        keyPath - path to read.
        entryName - entryName to read
        Returns:
        read File if read text is a path to an existing file or null
      • listSubKeys

        @NotNull
        java.util.Set<java.lang.String> listSubKeys​(@NotNull
                                                    Win32RegistryAccessor.Hive hive,
                                                    @NotNull
                                                    Bitness bitness,
                                                    @NotNull
                                                    java.lang.String keyPath)
        Enumerates sub key names of a given keyPath. i.e. for HKLM/Software/Microsoft it will definitely return 'Windows'
        Parameters:
        hive - hive
        bitness - registry branch - x32 or x64.
        keyPath - path to search
        Returns:
        key names without paths
      • listValueNames

        @NotNull
        java.util.Set<java.lang.String> listValueNames​(@NotNull
                                                       Win32RegistryAccessor.Hive hive,
                                                       @NotNull
                                                       Bitness bitness,
                                                       @NotNull
                                                       java.lang.String keyPath)
        Enumerates value names of a given keyPath.
        Parameters:
        hive - hive
        bitness - registry branch - x32 or x64.
        keyPath - path to search
        Returns:
        entries names without paths