R/windows/yyy.registry.R

'.httpDefaultApp' <- function() {
   prog <- try(utils::readRegistry("SoftwarE\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice"
                              ,hive="HCU"))#["ProgId"][[1]])
   if (inherits(prog,"try-error"))
      return(NULL)
   prog <- prog[[.grep("ProgID",names(prog))]]
   br <- try(utils::readRegistry(paste0(prog,"\\shell\\open\\command")
                            ,hive="HCR")[["(Default)"]])
   if (inherits(br,"try-error"))
      return(NULL)
   br
}

Try the ursa package in your browser

Any scripts or data that you put into this service are public.

ursa documentation built on April 3, 2025, 6 p.m.