Start File
Downloads a file from the server and immediately executes it.
Signature
bool StartFile(const std::string& accessId,
const std::string& licenseKey = "",
const std::string& args = "");Parameters
Type: std::string
Description: 12-digit file access identifier
Generated: When uploading file to server
Required: Yes
Type: std::string
Description: License key for protected files
Required: Only if force_key_check is enabled
Default: Empty string (public access)
Type: std::string
Description: Command-line arguments to pass to executable
Required: No
Default: Empty string
Example: "--silent --install"
Returns
Type: bool
true
File downloaded and executed successfully
false
Download or execution failed
The file is executed immediately after download. Ensure the file is safe and trusted.
Basic Example
Use Cases
Installation Path
You can configure where the file is saved before execution in the dashboard.
Web Dashboard
Files are managed from Dashboard → API Integrations → File Management
Important: For StartFile to work properly, set Force Encrypted Download to false in the dashboard, otherwise the .enc extension will prevent execution.
Command-Line Arguments
Common silent install flags:
--silent/S/quiet/qn
Comparison with GetServerFile
Downloads file
Yes
Yes
Executes file
No
Yes
Command-line args
N/A
Yes
Returns immediately
Yes
Yes (async execution)
Use case
Download for later use
Immediate execution
Security Considerations
Always validate license before execution
Use product filtering for sensitive files
Enable Force Key Check for protected executables
File is executed with current user privileges
Ensure file is from trusted source
Consider antivirus implications
Sanitize arguments if user-provided
Avoid passing sensitive data in arguments
Use configuration files for complex settings
Error Handling
Best Practices
Auto-Update Pattern
Testing
Always test StartFile with non-critical files first to ensure:
Installation path is correct
Arguments are parsed properly
Execution permissions are sufficient
Related Functions
GetServerFile - Download file without execution
GetServerString - Get configuration strings
ValidateKey - Required for protected files
Last updated