C program crashes when opened from file browser

When i write and run C program in Turbo C, the program executes and run. But i want to run program directly in Command Prompt from my file explorer. How to do so??