Renroy Johnson also staged two robberies, threatened police with a knife, stole a car and deliberately drove the Clio head on into an ambulance responding to the emergency, causing over £7,000 damage. He can only be freed on the orders of the Home Secretary.
The mentally disturbed 33-year-old ran amok just yards from his Tamar Close, Brownhills home after taking illegal drugs instead of his prescribed medication.
Johnson started the October 20 rampage by punching a passing 15-year-old youth in the face in a motiveless street attack, revealed Mr John Evans, prosecuting.
He then burst into McColls newsagents in nearby Shannon Drive, kneed shop assistant Julie Maskell in the head and punched her colleague Dean Oakes before producing a kitchen knife and ordering another member of staff to empty the till.
Johnson stuffed the £560 cash in his pocket before calmly returning to the block where he lived and knocked on the door of the flat above his.
It was opened by Kevin Leighton, aged 55, who was stabbed in the chest, suffering a collapsed lung before jumping out of a first floor window, breaking a bone in his back, continued the prosecutor.
The attacker turned on the victim's son Liam who came into the room after hearing the commotion and was stabbed in the abdomen, wrist, shoulder, neck and scalp before fleeing where he collapsed.
Johnson raced across the road to another flats block where he forced his way into the home of Collette Cathy, took the keys to her Renault Clio at the point of his bloodied knife and fled in the car deliberately crashing head-on into an ambulance responding to the earlier stabbings.
Johnson then used his knife to threaten police who had to Taser him twice before he could be arrested.
He pleaded guilty to attempted murder, wounding with intent, three cases of assault, two of robbery, dangerous driving, affray and possession of a knife.
Mr John Lucas, defending, told an earlier hearing: "The mental state in which he was capable of committing these offences was created by non adherence to the strict terms of a medical regime, coupled with the use of illegal drugs."
Judge Michael Challinor said an indefinite hospital order was the best way to 'protect the public and ameliorate the mental health symptoms' of the defendant.
This requires written confirmation that a bed and suitable treatment is available and Johnson was remanded in custody until October 20 for the process to be completed.