Google chrome app - easy install and launch for th

2019-06-14 08:20发布

问题:

Our situation:

  • We have an existing html5 + javascript code that we want to work offline, and want to have a user folder for storing images,videos etc.
  • We want this offline application to start another windows program with ole commands. (So let's say we want to call a .exe file that will do this work).
  • We are thinking of doing it with a google chrome app.

Questions:

  • Is there any way to create a windows desktop launcher to start google chrome with our app? (so that the google chrome doesn't appear at all to the final user, the application will be distributed to a few clients, and probably won't be uploaded to chrome webstore)
  • I suppose we have to create a windows installer to check if google chrome is installed and add registry key to support native messaging. If it can also install our google chrome app this would be awesome. Best way to do this, so that it would appear a few steps installation to the final user?

回答1:

Q1: Yes, you can do this. To see what flags to use you should create the shortcut using chrome and inspect it. (to do this go to the app launcher, find the app, right click and 'create shortcuts...'.

Note you can't really hide chrome as it is running in task manager, will show up in firewall, and may show up in other ways in future. Personally I think trying to hide it is a bad idea as users may get an unpleasant surprise if they find you have surreptitiously installed a browser on their computer.

Q2: Sorry I'm not really sure about that. I do know the chrome team is working on something similar, maybe by the time you are ready to go they will have finished that. (see https://code.google.com/p/chromium/issues/detail?id=341353 for more details).