SilentLauncher
SilentLauncher
Execute PowerShell and CMD scripts silently from Task Scheduler without flashing a console window.
About
SilentLauncher is a lightweight command-line tool for Windows designed to execute PowerShell and Batch scripts completely invisibly.
When you run a script using Windows Task Scheduler, the system often flashes a black console window on the screen for a fraction of a second, even if you configure the task to run hidden. Traditionally, IT teams used a VBScript (wscript.exe) wrapper to hide this window. However, modern Antivirus and EDR solutions frequently block VBScript from launching PowerShell due to security heuristics, and Microsoft is actively deprecating VBScript.
SilentLauncher solves this problem. Built as a native Windows GUI application, it uses the Windows API CREATE_NO_WINDOW flag to launch your scripts. This guarantees zero window flashing and bypasses the security restrictions associated with legacy VBScript wrappers.
Features
- 🚫 Zero Window Flashing: Compiled as a GUI subsystem app with native Windows API flags.
- 🛡️ EDR/AV Friendly: No VBScript, no PowerShell obfuscation, just a clean, signed binary.
- 🔄 Accurate Exit Codes: Passes the exact exit code of your script back to Task Scheduler or your RMM.
- 📝 Built-in Logging: Automatically logs execution details and rotates the log file at 2 MB.
- ⚡ Zero Dependencies: Compiles to a single native binary. No runtime required.
Built With
- Go — the programming language used to build this lightweight, dependency-free utility.
- golang.org/x/sys/windows — for providing the native Windows API bindings (specifically
CREATE_NO_WINDOW) that enable truly silent, flicker-free execution. - goversioninfo — the tool used to embed version metadata and custom icons into the compiled Windows executable.
Prerequisites
- Windows OS
Usage
SilentLauncher is designed to be called from Task Scheduler, RMM scripts, or command-line automation. It accepts a -script parameter for the file path and automatically passes any remaining arguments directly to your target script.
Arguments
| Name | Example | Description |
|---|---|---|
-script | "C:\Scripts\MyScript.ps1" | The absolute path to the PowerShell (.ps1) or Batch (.cmd / .bat) script you want to execute. |
[arguments] | -Config "C:\config.xml" | Any arguments provided after the script path are passed directly and safely to the target script. |
SilentLauncher automatically detects the file extension and uses the correct executor:
- For
.ps1files: Usespowershell.exewith-NoProfile,-NonInteractive,-ExecutionPolicy Bypass, and-WindowStyle Hidden. - For
.cmdor.batfiles: Usescmd.exe /c.
Examples
1. Run a PowerShell script silently (no parameters):
SilentLauncher.exe -script "C:\ProgramData\Automation\Script.ps1"
2. Run a PowerShell script with multiple parameter types (strings with spaces, booleans, integers):
SilentLauncher.exe -script "C:\ProgramData\Automation\Deploy.ps1" -TargetServer "Server-01" -Port 443 -Force
3. Run a Batch/CMD script silently with installer switches:
SilentLauncher.exe -script "C:\ProgramData\Automation\Install.cmd" /quiet /norestart LOGFILE="C:\Logs\install.log"
4. Run a script with complex, quoted arguments:
SilentLauncher.exe -script "C:\ProgramData\Automation\Notify.ps1" -Message "System update required. Please save your work." -Priority High
Logging
Every run appends a line-by-line log of what happened to SilentLauncher.log. This file is created in the exact same directory as the SilentLauncher.exe executable.
The log records:
- Initialization and the current executing user.
- The exact arguments received by the launcher.
- The fully resolved execution command.
- The final exit code (success or failure).
The log file is strictly capped at 2 MB. Once it exceeds this size, the launcher automatically truncates it to prevent unbounded disk growth.
Running from Task Scheduler or an RMM
To use SilentLauncher in Windows Task Scheduler, configure a new task with the following action:
- Action: Start a program
- Program/script:
C:\Path\To\SilentLauncher.exe - Add arguments:
-script "C:\Path\To\YourScript.ps1" -YourParam "Value"
(Optional but recommended): In the Task Scheduler "General" tab, ensure "Run whether user is logged on or not" is selected, and check "Run with highest privileges" if your script requires Administrator rights.
The executable will start, launch your script in the background without any UI, wait for it to finish, and then exit. The exit code returned to Task Scheduler will exactly match the exit code of your script, allowing your RMM or monitoring tools to accurately detect success or failure.
Changelog
2026-07-22
- Initial version of the document