The more technologically advanced a Nation is would determine how long the residents would survive in a scenario like being discussed. The US is listed as being one of the most technologically nations so it therefore would not take long for us to destroy our selves.
The more primitive technologically a nation is the longer it would survive. A nation or country without electricity, sewer services, water services, mass transportation, buses, trains and airlines, highways, hospitals, schools, supermarkets and other suppliers of food sources, etc could take a hit like being discussed and continue on with normal day to day activities because they were not dependent on external support for their life style.
A minor power outage in the US causes residents to start looting and destroying. A major catastrophic event would unleash the animals amongst us and I am afraid the horrific impact on humanity would be at a minimum devastating.
Think back a few years and recall the damage done after the fact in cities struck by a hurricane and what efforts were needed to restore safety for residents.
How many remember or know about the night the US Government turned off the lights in Hawaii. In a nuclear test in 1962, a 1.4 megaton device detonated 400km (250 miles) above the Pacific Ocean knocked out streetlights, set off burglar alarms and damaged the phone system in Hawaii 1,500km away. If the high-altitude test had been carried out 50º further north instead of close to the equator, the electromagnetic pulse would have done four to five times more electrical damage. A similar test by the Soviet Union knocked out power lines in Kazakhstan and set a power station on fire.
During the Cold War, each side was painfully aware of how vulnerable its electronic defense and communications systems were to an EMP attack by the other. Both took all the precautions they could.
Most of the damage done by a nuclear EMP is caused by the so-called E1 pulse—the first of a high-altitude nuclear explosion's three electromagnetic components. The E1 pulse is caused by gamma rays from the blast knocking electrons out of atoms in the rarefied upper atmosphere. These then travel downward at close to the speed of light, creating a large vertical current of electricity in the upper atmosphere. This sudden and intense current interacts with the Earth's magnetic field to produce a brief, but extremely large, pulse of electromagnetic energy capable of affecting a wide area on the ground.
The E1 pulse does its damage by injecting huge voltage spikes into electronic circuits, causing the various components to exceed their breakdown voltage—the point at which insulated parts become conductors and melt as they are shorted out. Because an E1 pulse rises to its peak so rapidly, it can destroy computers and communications gear before their normal lightning-protection switches have time to flip.
These days, the idea of detonating a nuclear EMP weapon to disable the radar defenses of some rogue dictatorship is politically unthinkable.
Defense laboratories have therefore turned their attention instead to producing large electromagnetic pulses by conventional explosives and other means.
One such weapon uses a small charge of explosive to ram an armature down the axis of a current-carrying coil, squeezing its magnetic field so violently in the process that it emits a powerful burst of electromagnetic energy over distances of several hundred meters.
Another type employs a Marx generator (a machine used for simulating lightning strikes) to dump a large electrical charge stored in a bank of capacitors into a specially shaped antenna.
American defense forces have converted a number of cruise missiles to function as non-nuclear EMP generators. Apparently, cars parked up to 300 meters away have had their alternators, ignition coils and engine controls disabled this way. Such e-weapons are said to have been used in Kosovo, the Persian Gulf and Afghanistan.
Intriguingly, a pair of such devices has recently broken cover. The Counter-Electronics High-Power Microwave Advanced Missile Project (CHAMP) is an unmanned aircraft fitted with a microwave pulse generator—presumably for disrupting enemy communications. The Pentagon has also announced that it is deploying an electromagnetic weapon, believed to be called Max Power, for detonating roadside bombs and disabling enemy vehicles. Both CHAMP and Max Power mimic the electromagnetic pulse of a nuclear explosion—albeit over a narrowly focused area and without the geomagnetic effect.
So in all likelihood the “Doomsday Scenario” button already exists. We can only hope that some nut does not get access.