Sam Lewis
The entire shortcut that we use is
C:\Windows\System32\cmd.exe /c whoami|clip & start "" "C:\Program Files\Google\Chrome\Application\chrome.exe" --app="https://leap.clcohio.org" --user-data-dir=C:\ProgramData\Leap --kiosk-printing & exit
The first part starts with cmd.exe so that it can copy (via |clip
) the output of the native command whoami
which outputs the domain\username in the format that Leap needs. This way, when staff open the shortcut, all they need to do is hit CTRL+V and their username fills in. Since our Windows domain name is a bit unusual (nt_wor) and most staff don’t have to know it for any other context, this is very helpful. Totally optional.
C:\Windows\System32\cmd.exe /c whoami|clip
Then it starts the actual Chrome application. We do not use a portable version (there isn’t really an official portable version, plus this way we do not need to update two copies of Chrome). Because of the cmd.exe at the beginning, we have to use & start ""
, but if that feature is not needed, the script can just start with the Chrome path.
"C:\Program Files\Google\Chrome\Application\chrome.exe" --app="https://leap.clcohio.org" --user-data-dir=C:\ProgramData\Leap --kiosk-printing
All of our systems have Chrome installed to the 64-bit path. Installs (but not updates) of Chrome have been in C:\Program Files
, rather than C:\Program Files (x86)
, since June 2020. We had another shortcut to a specific URL in Chrome and had to mass uninstall-reinstall Chrome for any that had an install before June 2020 (Made easy by PDQ Deploy & Inventory).
--app="https://leap.clcohio.org"
points us at Leap
--user-data-dir=C:\ProgramData\Leap
tells Chrome to use this shared generic path for all Chrome data instead of the user profile. The main benefit of this is for us to configure which printer is used for Leap, regardless of the default printer. The preferences file at C:\ProgramData\Leap\Default\Preferences defines this in what we call printer “chunks”, long strings of printer settings under “recent destinations” within that file. We make that file read-only so that the receipt printers are always preferred over the regular printers. This preferences file also configures Chrome to not prompt to save passwords (the main concern we had with shared Chrome data).
- If your staff stations are already set up with the receipt printers as default, then you can skip this part and let them use the normal AppData location for Chrome data.
--kiosk-printing
skips all print dialogs and prints to the first printer in preferences.
Again because of the cmd.exe start, we have to exit the CMD window. Without this, an empty CMD window stays up.
& exit
Upon install of the shortcut (in C:\Users\Public\Desktop), we create the C:\ProgramData\Leap folder and copy down the Preferences file. The rest of the data in that directory is actually generated when Chrome first launches. We also create a regular desktop shortcut to Leap that opens in a standard browser, which is more useful for staff when they need to print reports that they would actually prefer to come out of the regular printers.