In my application I want to open some files with the correct default programmes, like .doc file should be open with WORD and .psd files should be opened with Photoshop if it is
There is no way for you to choose which application will be used to open your files with javascript...It just doesn't have that power.