1

(Before downvote im aware how to do this using code thats inline to this command but not how to do it using a file that uses the --app="data:text/html,<sometags></sometags>)

How would I open a local html (mar.html) file using this command C:\'Program Files (x86)'\Google\Chrome\Application\chrome.exe --profile-directory="Default" --app=

Specifically, the issue is my lack of familiarity with the --app flag

I tried

C:\'Program Files (x86)'\Google\Chrome\Application\chrome.exe --profile-directory="Default" --app="mar.html"

C:\'Program Files (x86)'\Google\Chrome\Application\chrome.exe --profile-directory="Default" --app="file:///mar.html"

Both don't work.

Giving me the error

Your file was not found It may have been moved or deleted. ERR_FILE_NOT_FOUND

Mark
  • 1,337
  • 23
  • 34

1 Answers1

0

You almost got it. The file descriptor path must be absolute and encoded. Encoding the path correctly with cli tools like "urlencode"(gridsite-clients) did not work for me.

If you have NodeJS installed and would use a linux machine, you could use this command.

chromium --app=`node -e "console.log('file://'+encodeURI(process.argv[1]))" "$(realpath "/path/of/your/file.html")"`

This works also fine with relative paths.
For windows you have to rewrite this yourself.