Solved Bat file for opening google chrome in kiosk

March 24, 2012 at 15:52:26
Specs: Windows 7

Please take note of the command in this bat file :

@echo off
start GoogleChromePortable.exe /index.html --kiosk

Google Chrome Portable does open in kiosk, except that it fails to open index.html.

Instead, it shows the home page (which I also set up to open index.html, in order to be able to see it); I don't know if the reason for this is that Chrome does not accept any destination file, only the configured home page, when commanded to open in kiosk mode. Although I get to show the desired index.html page, it forces me to set up the index.html file in the browser configuration using the absolute path, taking away the flexibility of using any directory.

Thanks !!

See More: Bat file for opening google chrome in kiosk

Report •

March 26, 2012 at 12:58:10
From the way the question is posed, I assume the index.html you're trying to open is local and always in the same directory as the chrome executable.

If that's the case try:
@echo off
start GoogleChromePortable.exe --kiosk %cd%\index.html

I just gave this a shot on my system successfully

Report •

March 26, 2012 at 14:14:33 did work !!!

Just to strenghten my knowledge on the matter...

1. What if I were to open a second-level directory, say docs/index.html...what'd would I use ?
2. What is the purpose of %cd% ?

Thanks again...

Report •

March 26, 2012 at 14:54:46
✔ Best Answer
Let's say you have:
and in there you have GoogleChromePortable.exe, your .bat file, and a folder named docs with an index.html file inside.

Your .bat file would then look like:
@echo off
start GoogleChromePortable.exe --kiosk %cd%\docs\index.html

As to your second question - %CD% is a variable representing your current working directory. So in my example above %CD=C:\GoogleChromePortable. You can test this yourself by adding two lines to the start of your bat:

@echo off
echo %cd%
start GoogleChromePortable.exe --kiosk %cd%\docs\index.html

I hope that's helpful :)

Report •

Related Solutions

Ask Question