What I wanted to do here is, open an exe file on my server through a browser.
I managed to do it using following php code which I found in an answer :
shell_exec('SCHTASKS /F /Create /TN _notepad /TR "notepad.exe" /SC DAILY /RU INTERACTIVE');
shell_exec('SCHTASKS /RUN /TN "_notepad"');
shell_exec('SCHTASKS /DELETE /TN "_notepad" /F');
This will open notepad on your server. You can replace path to your exe file with notepad.exe
This worked for Windows 8.1, Windows 10 and Windows 2012 Server
You can also try following steps to enable Apache service to run desktop application:
Start->Run, type "services.msc" to bring up Services control (other ways to get there, this is easiest IMO)
Locate your Apache service (mine was called "wampapache" using WampServer 2.0)
Open the service properties (double-click or right click->properties)
Flip to the Log On account and ensure the checkbox titled "Allow service to interact with Desktop" is checked
Flip back to the General tab, stop the service, start the service
Here is the link to question which I followed for solution : php How do I start an external program running - Having trouble with system and exec
Hope it helps someone else.