Kaiser Wilhelm wasn’t crazy. He did want a war with France or Russia. He wanted Austria-Hungary to crush Serbia. The real lunatic was his cousin, Czar Nicholas II, who decided he had to support terrorists and the regicidal regime in Serbia because of Slavophilia.
It was France’s alliance with Russia, that guaranteed that the war would spread.