This worked for me:
None of the solutions worked for me, so I tried my own way with the toolkit, now it works, without crashes.
1. Full install
2. Apply 1.7 patch
3. Get the Microsoft Application Compatibility Toolkit (4.1)
(google)
4. Run from tools: Compatibility Administrator
5. Click fix
6. Name: Dungeon Keeper 2
Vendor: Bullfrog
Location is DKII.exe (from your game directory)
7. Operation system modes is win 98/ME
Next.
8. Auto-genereate
Next.
9. Save
10. Go to your new made databse (below custom databases)
Rightclick on it, install.
11. Play the game
Hope this works for you. You can apply a no cd-patch if you like.
Let me know if it works