Welcome to SnapRun! This guide will help you install, configure, and start using SnapRun for Windows automation. Within minutes, you'll be running your first automation scripts.
- Download your preferred installer from the Releases page
- Run the installer as administrator (if required)
- Follow the installation wizard
- Launch SnapRun from Start Menu or Desktop
- Open SnapRun - You'll see the script search interface
- Try a built-in script - Click "Hello World Test" to see it in action
- Check your system tray - SnapRun is now running in the background
- Use the shortcut - Press
Ctrl+Shift+Jto show/hide the application
- Navigate to
Documents\SnapRun\Scripts\ - Create a new file called
my_first_script.rhai - Add this content:
print("Hello from my first script!");
let username = env("USERNAME");
print("Welcome, " + username + "!");
- Refresh SnapRun - Your script appears automatically!
- Run your script and see the output
SnapRun provides multiple installation methods to suit your needs:
File: SnapRun_1.0.1_x64_inno_setup.exe (~5.7 MB)
- โ Feature-rich installer with advanced options
- โ Complete setup including environment variables
- โ
File associations for
.rhaifiles - โ Uninstaller support
- โ Best for most users
Installation Steps:
- Download the Inno Setup installer
- Right-click and "Run as administrator" (recommended)
- Follow the installation wizard
- Choose installation options:
- โ Desktop Icon - For easy access
- โ Environment Variables - For advanced features
- โ
File Associations - To open
.rhaifiles directly - โ Start Menu Shortcuts - For convenient access
File: SnapRun_1.0.1_x64_en-US.msi (~4.6 MB)
- โ Windows Installer technology
- โ Group Policy deployment support
- โ Corporate environments
- โ Silent installation support
Installation Steps:
# Standard installation
msiexec /i SnapRun_1.0.1_x64_en-US.msi
# Silent installation
msiexec /i SnapRun_1.0.1_x64_en-US.msi /quietFile: SnapRun_1.0.1_x64-setup.exe (~3.0 MB)
- โ Smallest installer size
- โ Quick installation
- โ Standard Windows installer experience
Installation Steps:
- Download the NSIS installer
- Double-click to run
- Follow the simple installation wizard
File: tauri-app.exe (Requires full build)
- โ No installation required
- โ Portable - run from any location
- โ Testing and development
- โ Manual setup of environment variables
- โ No file associations
-
Launch SnapRun
- From Start Menu:
SnapRun - From Desktop: Double-click the SnapRun icon
- From System Tray: Right-click tray icon โ "Show SnapRun"
- From Start Menu:
-
Verify Installation
- You should see 13 scripts available (12 built-in + 1 sample)
- Try running "System Info" to verify system access
- Check that your custom scripts folder exists:
Documents\SnapRun\Scripts\
-
Test Global Shortcuts
- Press
Ctrl+Shift+J- Application should show/hide - Press
Ctrl+Wwhile app is focused - Application should hide to tray - If shortcuts don't work, check for conflicts with other applications
- Press
After installation, these environment variables are configured:
SnapRun_HOME=C:\Program Files\SnapRun
SnapRun_SCRIPTS=C:\Users\{YourUsername}\Documents\SnapRun\ScriptsTo verify: Open Command Prompt and type:
echo %SnapRun_HOME%
echo %SnapRun_SCRIPTS%Create Documents\SnapRun\Scripts\system_check.rhai:
// System Information Script
print("=== System Information ===");
let computer = env("COMPUTERNAME");
let username = env("USERNAME");
let userprofile = env("USERPROFILE");
print("Computer: " + computer);
print("User: " + username);
print("Profile: " + userprofile);
print("\n=== Disk Space ===");
let disk_info = exec_capture("powershell.exe Get-WmiObject -Class Win32_LogicalDisk | Select-Object Size,FreeSpace,DeviceID");
print(disk_info);
print("\n=== Current Time ===");
let current_time = exec_capture("powershell.exe Get-Date");
print(current_time);
Create Documents\SnapRun\Scripts\organize_downloads.rhai:
// Organize Downloads Folder
let downloads = env("USERPROFILE") + "\\Downloads";
print("Organizing: " + downloads);
// Create organization folders
md(downloads + "\\Images");
md(downloads + "\\Documents");
md(downloads + "\\Archives");
// Move files by extension
let files = list_dir(downloads + "\\*.*");
for file in files {
if file_exists(file) {
let ext = path_extension(file).to_lower();
let filename = path_filename(file);
if ext == ".jpg" || ext == ".png" || ext == ".gif" {
let dest = downloads + "\\Images\\" + filename;
move_file(file, dest);
print("Moved image: " + filename);
} else if ext == ".pdf" || ext == ".doc" || ext == ".txt" {
let dest = downloads + "\\Documents\\" + filename;
move_file(file, dest);
print("Moved document: " + filename);
} else if ext == ".zip" || ext == ".rar" || ext == ".7z" {
let dest = downloads + "\\Archives\\" + filename;
move_file(file, dest);
print("Moved archive: " + filename);
}
}
}
print("โ
Downloads organized!");
Create Documents\SnapRun\Scripts\system_cleanup.rhai:
// System Cleanup Script
print("๐งน Starting system cleanup...");
let temp_folder = env("TEMP");
print("Cleaning temporary files from: " + temp_folder);
// Get temp files
let temp_files = list_dir(temp_folder + "\\*.*");
let cleaned_count = 0;
for file in temp_files {
try {
if file_exists(file) {
delete_file(file);
cleaned_count = cleaned_count + 1;
}
} catch (error) {
// Skip files that can't be deleted (in use)
}
}
print("๐๏ธ Cleaned " + cleaned_count + " temporary files");
// Clear recycle bin (optional)
let confirm_recycle = confirm("Clear Recycle Bin?");
if confirm_recycle {
exec("powershell.exe Clear-RecycleBin -Force");
print("๐๏ธ Recycle Bin cleared");
}
print("โ
System cleanup complete!");
- Script Search: Find and filter your scripts
- Script List: All available scripts (built-in and custom)
- Run Button: Execute the selected script
- Output Panel: View script results and messages
- Tray Icon: SnapRun runs quietly in your system tray
- Right-click Menu:
- Show SnapRun: Bring application to foreground
- Hide SnapRun: Send application to background
- Quit: Close application completely
Ctrl+Shift+J: Show/Hide application (global shortcut)Ctrl+W: Hide application to tray (when focused)Enter: Run selected scriptEscape: Clear search or hide application
You can add additional script directories by setting the SnapRun_SCRIPTS environment variable:
# Add multiple script locations (separated by semicolon)
set SnapRun_SCRIPTS=C:\Users\YourName\Documents\SnapRun\Scripts;D:\MyScripts;E:\SharedScriptsAfter installation, .rhai files are associated with SnapRun:
- Double-click any
.rhaifile to run it - Right-click โ "Edit" to open in your default text editor
- Right-click โ "Open with" โ "SnapRun" to run
To run SnapRun automatically at Windows startup:
- Press
Win+R, typeshell:startup - Copy the SnapRun shortcut to this folder
- SnapRun will start with Windows and minimize to tray
- Check location: Scripts must be in
Documents\SnapRun\Scripts\ - Check extension: Files must have
.rhaiextension - Refresh: Restart SnapRun or wait a few seconds for auto-refresh
- Conflict check: Another application may be using
Ctrl+Shift+J - Admin rights: Try running as administrator once
- Restart: Restart SnapRun to re-register shortcuts
- File access: Ensure you have read/write permissions for target files
- System operations: Some operations may require administrator privileges
- Antivirus: Check if antivirus is blocking script execution
- Windows version: Requires Windows 10 version 1809 or later
- DWM service: Ensure Desktop Window Manager service is running
- Hardware: Some virtual machines may not support transparency
- Check Documentation: Review the User Guide and FAQ
- Example Scripts: Study the built-in scripts for patterns and techniques
- Error Messages: Read error messages carefully - they usually explain the issue
- GitHub Issues: Report bugs at GitHub Issues
Now that SnapRun is installed and configured:
- Explore Built-in Scripts: Try all 12 built-in scripts to see what's possible
- Read the User Guide: Learn advanced features and techniques
- Check API Reference: Discover all available functions
- Join the Community: Share your scripts and get help from other users
- Build Complex Automations: Combine functions to create powerful workflows
- Start Simple: Begin with basic file operations and work up to complex automation
- Use Comments: Document your scripts for future reference
- Test Safely: Always test scripts on sample data first
- Backup Important Files: Create backups before running destructive operations
- Share Scripts: Help others by sharing useful automation scripts
Next: User Guide | Script Reference