Frequently asked questions about SnapRun. Find quick answers to common questions about installation, usage, scripting, and troubleshooting.
SnapRun is a modern Windows automation platform that uses the Rhai scripting language to create powerful automation scripts. It combines the simplicity of Rhai with comprehensive system integration for file operations, process management, and user interfaces.
| Feature | SnapRun | PowerShell | Batch Files |
|---|---|---|---|
| Ease of Learning | β Simple Rust-like syntax | β Simple but limited | |
| Safety | β Sandboxed execution | β Full system access | β Full system access |
| Modern UI | β Glass effects, dark theme | β Command line only | β Command line only |
| Cross-platform | β Multi-platform | β Windows only | |
| Performance | β Native Rust backend | β Fast but limited | |
| User-friendly | β GUI with tray integration | β CLI focused | β CLI only |
Yes! SnapRun is completely free and open-source under the MIT License. You can use it for personal, commercial, or educational purposes without any restrictions.
- Minimum: Windows 10 version 1809 (build 17763)
- Recommended: Windows 11 or Windows 10 21H2+
- Architecture: x64 (64-bit) only
- Inno Setup (5.7 MB): Recommended for most users, full-featured
- MSI (4.6 MB): Best for enterprise/corporate environments
- NSIS (3.0 MB): Smallest size, quick installation
- Installation: Administrator rights recommended but may not be required
- Usage: Regular user privileges sufficient for most operations
- System tray: Works without admin rights
- File operations: Limited to user-accessible locations without admin rights
Yes! All installers are self-contained and don't require internet connectivity during installation. SnapRun also runs completely offline.
- Installation: ~50 MB for program files
- Scripts: Minimal (a few KB per script)
- Recommended: 100 MB free space for comfortable operation
Not recommended. Installing a newer version will upgrade the existing installation. If you need multiple versions, use portable mode or different virtual machines.
- Navigate to
Documents\SnapRun\Scripts\ - Create a file called
my_script.rhai - Add this content:
print("Hello, World!");
let user = env("USERNAME");
print("Welcome, " + user + "!");
- Open SnapRun and your script will appear automatically
User scripts: Documents\SnapRun\Scripts\ (recommended)
- β No admin rights needed
- β Easy to backup
- β Survives updates
Built-in scripts: C:\Program Files\SnapRun\Scripts\built_in_scripts\
- β Read-only
- β Overwritten by updates
- β Good as examples/templates
Method 1: From SnapRun interface
- Open SnapRun
- Select your script
- Click "Run Script"
Method 2: Double-click (if file associations are set up)
- Navigate to your
.rhaifile in File Explorer - Double-click to run
Method 3: System tray
- Right-click SnapRun tray icon
- Select "Quick Scripts" (if available)
SnapRun doesn't include a built-in scheduler, but you can use:
Windows Task Scheduler:
- Open Task Scheduler
- Create new task
- Set trigger (daily, weekly, etc.)
- Set action to run:
"C:\Program Files\SnapRun\SnapRun.exe" "path\to\your\script.rhai"
PowerShell scheduled jobs:
Register-ScheduledJob -Name "MyScript" -ScriptBlock {
& "C:\Program Files\SnapRun\SnapRun.exe" "C:\Users\YourName\Documents\SnapRun\Scripts\my_script.rhai"
} -Trigger (New-JobTrigger -Daily -At "9:00 AM")SnapRun uses Rhai, a lightweight scripting language embedded in Rust applications. Rhai has Rust-like syntax but is designed to be simple and safe.
Key features:
- Familiar syntax (similar to Rust/JavaScript)
- Dynamic typing
- Safe execution (sandboxed)
- Excellent performance
- Easy to learn
| Aspect | Rhai | Python | JavaScript |
|---|---|---|---|
| Syntax | Rust-like | Python-like | C-like |
| Typing | Dynamic | Dynamic | Dynamic |
| Safety | Sandboxed | Full access | Browser-sandboxed |
| Performance | Very fast | Medium | Fast |
| Learning curve | Easy | Easy | Medium |
SnapRun provides over 20 built-in functions organized in categories:
File Operations: read_file(), write_file(), copy_file(), delete_file(), file_exists()
Directory Operations: md(), cd(), pwd(), list_dir(), dir_exists()
Process Management: exec(), exec_capture(), start_process()
User Interface: print(), show_message(), confirm(), input(), render_markdown()
Environment: env()
Utilities: len(), path_filename(), path_directory(), path_extension()
See API Reference for complete details.
Yes! Rhai supports all standard programming constructs:
Loops:
// For loop
for i in range(1, 11) {
print("Number: " + i);
}
// While loop
let count = 0;
while count < 5 {
print("Count: " + count);
count = count + 1;
}
// For each
let files = list_dir("*.txt");
for file in files {
print("Processing: " + file);
}
Conditions:
let file = "document.pdf";
if file_exists(file) {
print("File found!");
} else {
print("File not found!");
}
// Switch-like matching
let ext = path_extension(file);
switch ext {
".txt" => print("Text file"),
".pdf" => print("PDF document"),
".jpg", ".png" => print("Image file"),
_ => print("Unknown type")
}
Method 1: Check before operating
if file_exists("important.txt") {
let content = read_file("important.txt");
print(content);
} else {
show_error("File not found!");
}
Method 2: Try-catch pattern
try {
let content = read_file("might_not_exist.txt");
print("File content: " + content);
} catch (error) {
show_error("Failed to read file: " + error);
}
Method 3: Validate inputs
fn safe_delete(file_path) {
if file_path == "" {
show_error("File path cannot be empty");
return false;
}
if !file_exists(file_path) {
show_warning("File doesn't exist: " + file_path);
return false;
}
let confirmed = confirm("Delete " + path_filename(file_path) + "?");
if confirmed {
delete_file(file_path);
return true;
}
return false;
}
Yes! Rhai supports custom functions:
// Simple function
fn greet(name) {
return "Hello, " + name + "!";
}
// Function with multiple parameters
fn calculate_area(width, height) {
return width * height;
}
// Function with default behavior
fn safe_read_file(path, default_content) {
if file_exists(path) {
return read_file(path);
} else {
return default_content;
}
}
// Usage
print(greet("Alice"));
let area = calculate_area(10, 5);
let config = safe_read_file("config.txt", "default_config");
Rhai provides rich string manipulation:
let text = "Hello, World!";
// String methods
print(text.to_upper()); // "HELLO, WORLD!"
print(text.to_lower()); // "hello, world!"
print(text.len()); // 13
print(text.replace("World", "Rhai")); // "Hello, Rhai!"
// String splitting
let csv_line = "apple,banana,orange";
let fruits = csv_line.split(",");
for fruit in fruits {
print("Fruit: " + fruit);
}
// String trimming
let input = " spaces everywhere ";
print(input.trim()); // "spaces everywhere"
// String checking
if text.contains("World") {
print("Found 'World' in text");
}
if text.starts_with("Hello") {
print("Text starts with 'Hello'");
}
SnapRun is designed to be lightweight:
- Memory: ~10-20 MB when idle, ~50-100 MB when running scripts
- CPU: Minimal when idle, varies with script complexity
- Disk: ~50 MB installation, minimal ongoing disk usage
- Network: None (SnapRun works completely offline)
Yes! SnapRun is designed with security in mind:
Sandboxed execution: Scripts run in a controlled environment Limited system access: Scripts can only use approved functions No network access: Scripts cannot make network connections User permission model: Respects Windows file permissions Code review: SnapRun is open-source for transparency
However, like any automation tool, scripts can still:
- Modify files you have access to
- Execute approved system commands
- Show UI dialogs
Always review scripts before running them, especially from unknown sources.
SnapRun itself is safe, but scripts can potentially:
β Safe operations:
- Read/write files in your user directories
- Execute standard Windows commands
- Show dialogs and messages
- Process text and data
- Delete important files (if you have permission)
- Modify system files (if running as administrator)
- Execute external programs
- Bulk file operations
π‘οΈ Safety measures:
- Always backup important data
- Test scripts on sample data first
- Review scripts before running
- Don't run scripts from untrusted sources
- Use confirmation dialogs for destructive operations
No! SnapRun does not collect, store, or transmit any user data, telemetry, analytics, or usage statistics. Everything runs locally on your computer.
Technical: Yes, SnapRun should work on corporate computers Policy: Check with your IT department first
Considerations:
- Some corporate antivirus may flag new executables
- Group Policy might restrict software installation
- Corporate firewalls won't affect SnapRun (no network usage)
- Scripts respect existing Windows permissions
SnapRun doesn't include automatic updates. To update:
- Check GitHub Releases for new versions
- Download the latest installer
- Run the installer (it will upgrade the existing installation)
- Your custom scripts will be preserved
Backup recommendation: Before updating, backup your Documents\SnapRun\Scripts\ folder.
Check these common issues:
- File extension: Must be
.rhai, not.txtor.rhai.txt - Location: Must be in
Documents\SnapRun\Scripts\ - Permissions: Ensure you can read the file
- Refresh: Press F5 or restart SnapRun
- Hidden files: Check if file is hidden in File Explorer
Common causes and solutions:
-
Incorrect path: Use full paths or environment variables
// Wrong let content = read_file("myfile.txt"); // Right let content = read_file(env("USERPROFILE") + "\\Documents\\myfile.txt"); -
Backslash escaping: Use double backslashes or forward slashes
// Wrong let path = "C:\Users\Name\file.txt"; // Right let path = "C:\\Users\\Name\\file.txt"; // or let path = "C:/Users/Name/file.txt"; -
Permissions: Ensure you have access to the file/folder
-
File existence: Check if file actually exists at that location
Possible causes:
- Conflict: Another application is using
Ctrl+Shift+J - Admin rights: Try running SnapRun as administrator once
- Windows version: Some older Windows versions may have issues
- Restart: Restart SnapRun to re-register shortcuts
Alternative: Use system tray right-click menu instead
Solutions by scenario:
- System files: Don't try to modify files in
C:\Windows\orC:\Program Files\ - Other users' files: You can only access your own user directory
- Administrator needed: Some operations require running as administrator
- Files in use: Close applications that might be using the files
For bugs:
- Visit GitHub Issues
- Search existing issues first
- Create new issue with:
- Clear description of the problem
- Steps to reproduce
- Your Windows version
- SnapRun version
- Script code (if applicable)
For feature requests:
- Check GitHub Discussions first
- Create detailed feature request
- Explain use case and benefits
Yes! SnapRun is open-source and welcomes contributions:
Ways to contribute:
- Report bugs and issues
- Suggest features and improvements
- Create example scripts
- Improve documentation
- Submit code contributions
- Help other users in discussions
Getting started:
- Fork the repository on GitHub
- Read the Contributing Guide
- Make your improvements
- Submit a pull request
Documentation:
- User Guide - Complete usage instructions
- API Reference - All available functions
- Getting Started - Quick start guide
Community:
- GitHub Issues - Bug reports and questions
- GitHub Discussions - General discussions
- Built-in scripts - Great examples of what's possible
Learning Rhai:
- Official Rhai Book - Comprehensive Rhai documentation
- Built-in scripts in SnapRun - Practical examples
- Rhai Playground - Online Rhai testing
Still have questions? Check out our GitHub Discussions or create an issue for bug reports.