Advanced Case

Advanced Case: Remote PC That Fetches and Runs Scripts from a Server

This is the most sophisticated Repio setup: a headless PC that boots, fetches its instructions from a web server, executes them, and can be updated remotely - no physical access required.

Architecture Overview

The setup uses Repio's Web Hook include feature - an action type that fetches a CSV macro file from an HTTP URL and executes those actions inline, as if they were part of the main macro.

The flow:

  1. PC boots and Windows starts Repio via autostart
  2. Repio loads a small launcher CSV (local, static)
  3. The launcher has one action: include pointing to http://your-server/macro.csv
  4. Repio fetches macro.csv from the server and executes it
  5. To update behavior: edit macro.csv on the server - next run picks up changes automatically
Why not just update the local file remotely? This approach requires no remote desktop, no file sync, no SSH. Just a static file on any web server. Simpler and more reliable for unattended machines.

Server Setup

Any HTTP server that can serve a static file works. Options from simplest to most robust:

  • Python built-in: python -m http.server 8080 in the folder with your CSV
  • Nginx: Serve a static directory with proper MIME types
  • GitHub raw URL: Host your CSV in a GitHub repo and use the raw URL (free, version-controlled\!)
  • Any file hosting with direct URL access

The CSV file served must have Content-Type: text/plain or text/csv. GitHub raw URLs do this automatically.

# Example: host on GitHub
# Your CSV at: github.com/you/automation/blob/main/office-macro.csv
# Raw URL:     raw.githubusercontent.com/you/automation/main/office-macro.csv

# This is the URL you put in the Repio web hook action

Web Hook Action in Repio

The local launcher CSV has a single action row:

action_type,button,x,y,delay_ms,comment
include,,,,https://raw.githubusercontent.com/you/repo/main/office-macro.csv,Fetch remote scenario

When Repio plays this, it downloads the URL, parses it as CSV, and executes those actions inline - in the same thread, with full access to all Repio capabilities (loops, includes, key/mouse actions, post-scripts). The remote macro can itself include other URLs, building a dynamic chain of behaviors.

TTL Caching

Repio caches web hook responses with a configurable TTL (Time To Live). By default, it re-fetches the URL on every play. You can set TTL in the action comment field using the syntax ttl=3600 (seconds).

# Fetch fresh every run (ttl=0):
include,,,,https://server/macro.csv,Remote scenario ttl=0

# Cache for 1 hour (re-use if played within 60 minutes):
include,,,,https://server/macro.csv,Remote scenario ttl=3600

For the unattended PC use case, ttl=0 is recommended so every run gets the latest version from the server.

Autostart Configuration

In Repio Settings, General tab: enable Launch on login to start with Windows, enable Start minimized for no visible window, and set the launcher CSV as the default file to open on startup.

Update Workflow

Once deployed, the update cycle is simple:

  1. Edit office-macro.csv on your server (or push to GitHub)
  2. Wait for next scheduled run, or trigger it manually
  3. No access to the remote PC needed at all

This is powerful for managing multiple machines: one CSV file on a server, all machines run the same updated behavior. Change the server file once, all machines update simultaneously on their next run.

Security Notes

Important: Only use this pattern on internal networks or with authenticated URLs. An HTTP URL on a public network could be intercepted - use HTTPS, and consider adding a simple token parameter (?token=SECRET) that your server validates before serving the CSV.
  • For internal LANs: plain HTTP is fine, no external exposure
  • For internet-facing servers: use HTTPS plus token validation
  • GitHub private repo raw URLs require authentication - use GitHub Personal Access Tokens in the URL for private repos

Troubleshooting

  • Fetch fails silently: Check Windows Firewall rules for the Repio process. Allow outbound HTTP/HTTPS on port 80/443.
  • Wrong content served: Verify Content-Type header - some servers serve .csv as application/octet-stream which may cause parse issues. Use text/plain.
  • Timing issues: If the remote script has no delays and runs on a slow machine, add explicit wait actions in the remote CSV.
  • Machine does not start the macro: Check that the Windows autostart registry key is set - Repio Launch on login writes to HKCU\Software\Microsoft\Windows\CurrentVersion\Run.

Want to try the remote script runner setup?

Download Repio PRO and start automating your unattended machines today.

Download Repio PRO