Windows knows what to do with a file based on the file's extension. Different extensions have different programs associated with them. Go to 'My Computer'/ Tools/ Folder Options and click on the 'File Types' tab on the right. Go down to file type: .jpg for example. Click on it, and it will tell you what program that file extension is associated with. Click on 'Change', and enter the command line for the program you want to open it with by default.