Activation subroutine

An activation subroutine was a standard set of procedures that were required to be followed prior to the initiation of a computer program, including complex programs that controlled the powering up of a technological component.

Complex holographic programs such as The Doctor had extensive activation subroutines. Initially, The Doctor's activation subroutines could be activated (and deactivated) only by another member of the crew (something that led him to state that he felt like a light bulb). That was later changed, and he could activate and deactivate himself as needed. The precise command to do so was "Override Command 1-EMH-Alpha and end program." This was later simplified to "Deactivate EMH." 

The EMH Mark II seemed to have the ability to deactivate himself by default; the one aboard the USS Prometheus (Prometheus class) accidentally did so when instead trying to deactivate The Doctor.