display status report even though the module is disabled I want to execute some code in my custom module to display status reports even though my custom module is disabled.

Hook_requirements can be used to display status reports. But it seems that it only works when the module is enabled. I want this to work even though the module is disabled.

Please tell if anybody knows the solution. Thanks in advance.
That's not possible.

For hooks to be executed, your module must be enabled. From the docs:


  To extend Drupal, a module need simply implement a hook. When Drupal wishes to allow intervention from modules, it determines which modules implement a hook and calls that hook in all enabled modules that implement it.


Emphasis mine.

Allowing modules to run code even when they're not enabled would be a massive security risk, and could cause all sorts of other unforeseen problems.