Jump to content

Digital Signage: Auto-launch URL in Chrome fullscreen


DaleMahalko
 Share

Recommended Posts

This is a really simple script to auto-start a URL in Chrome fullscreen when a Windows computer reboots.

This allows me to have digital signage created with Google Slides auto-launch fullscreen in a Chrome browser window, but also allows me to schedule automatic Windows updates with auto-restart at 1 am. When Windows reloads, it automatically logs on and goes to the desktop, and then this script relaunches Chrome where we left off.

The target URL is placed in a folder on the desktop called "AutoURL". To change to a new launch target simply replace the URL file in there, close Chrome, and relaunch this script.

It only reads the first matching *.URL file and ignores everything else.

 

; Auto-launch any URL in Chrome fullscreen at Windows startup
; by Dale Mahalko  - dmahalko@gmail.com
;
#AutoIt3Wrapper_Change2CUI=y

$URLFile=FileFindFirstFile ( @DesktopDir & "\AutoURL\*.url" )
IF $URLFile <> -1 Then
    $TheFile = @DesktopDir & "\AutoURL\" & FileFindNextFile($URLFile)
    ConsoleWrite("Found first *.url file: " & $TheFile & @CRLF)
    $sURL=IniRead( $TheFile,"InternetShortcut","URL","")
    ConsoleWrite("URL: " & $sURL & @CRLF)
    $Params = " --start-fullscreen " & Chr(34) & $sURL & chr(34)
    ConsoleWrite("Params: " & $Params & @CRLF)
    ShellExecute(@ProgramFilesDir & "\Google\Chrome\Application\chrome.exe", $Params )
EndIf
FileClose($URLFile)

Setup:

0. Install Google Chrome.

1. Enable Windows Automatic Update, to run at some time when the sign doesn't need to be viewed.

2. Create either a local user account on the machine, or a network domain account.

3. Using the Registry editor, set up Windows AutoAdminLogon so this account automatically logs on and goes to the desktop at system startup. Be sure to specify the username as either LocalMachineName\Username or DomainName\Username   ... the password is plaintext in the registry using AutoAdminLogin, so don't give this account administrative privileges.

4. Using the auto-login account, create a desktop folder called "AutoURL"

5. Compile this script, and put the program in the Startup folder of the auto-logon account. Also put a shortcut to this program on the desktop.

Usage:

6. In Chrome highlight the text in the address bar of the page you want to auto-launch. Now point at the highlighted text and drag the it onto the Windows desktop, onto the "AutoURL" folder. This will create a *.URL file in the folder, pointing to that address.

7. If there is old/previous URL file present in the "AutoURL" folder, delete it or move it out.

8. If Chrome is open, close it, and run this script via the shortcut on the desktop to relaunch the URL fullscreen.

 

Simple sample kitteh Google Slides slideshow I created for testing this:  

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...