How can I open a file with it's default program via a package.json script

Viewed 21

How I do I make it so running npm start opens image.png in windows photo viewer?

{
    "name": "open-image",
    "version": "1.0.0",
    "scripts": {
        "start": "image.png"
    },
}
1 Answers

Open it with Explorer, and Explorer will choose the default program.

"start": "explorer.exe image.png"
Related