Class WindowsSchemeInstaller

  • All Implemented Interfaces:
    SchemeInstaller

    public class WindowsSchemeInstaller
    extends Object
    implements SchemeInstaller
    Windows implementation of SchemeInstaller using the Windows Registry.

    This implementation uses the reg command-line tool to manipulate the Windows Registry under HKEY_CURRENT_USER\Software\Classes. No administrator privileges are required.

    Author:
    Curtis Rueden, Marwan Zouinkhi
    • Constructor Detail

      • WindowsSchemeInstaller

        public WindowsSchemeInstaller​(org.scijava.log.LogService log)
    • Method Detail

      • isSupported

        public boolean isSupported()
        Description copied from interface: SchemeInstaller
        Checks if this installer is supported on the current platform.
        Specified by:
        isSupported in interface SchemeInstaller
        Returns:
        true if the installer can run on this OS
      • install

        public void install​(String scheme,
                            String executablePath)
                     throws IOException
        Description copied from interface: SchemeInstaller
        Installs a URI scheme handler in the operating system.
        Specified by:
        install in interface SchemeInstaller
        Parameters:
        scheme - The URI scheme to register (e.g., "myapp")
        executablePath - The absolute path to the executable to launch
        Throws:
        IOException - if installation fails
      • isInstalled

        public boolean isInstalled​(String scheme)
        Description copied from interface: SchemeInstaller
        Checks if a URI scheme is already registered.
        Specified by:
        isInstalled in interface SchemeInstaller
        Parameters:
        scheme - The URI scheme to check
        Returns:
        true if the scheme is already registered
      • getInstalledPath

        public String getInstalledPath​(String scheme)
        Description copied from interface: SchemeInstaller
        Gets the executable path registered for a given scheme.
        Specified by:
        getInstalledPath in interface SchemeInstaller
        Parameters:
        scheme - The URI scheme to query
        Returns:
        The registered executable path, or null if not registered
      • uninstall

        public void uninstall​(String scheme)
                       throws IOException
        Description copied from interface: SchemeInstaller
        Uninstalls a URI scheme handler from the operating system.
        Specified by:
        uninstall in interface SchemeInstaller
        Parameters:
        scheme - The URI scheme to unregister
        Throws:
        IOException - if uninstallation fails