I have installed the 3D GameStudio A7.21

My Game is running properly through source, when I publish as exe it gives an error as Can't open DirectX Device.

I have installed updated DirectX 9.12.589.