Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asheroto/SpawnProcess
Spawns a new process from the command line without blocking execution. Made for Windows. Perfect for running a program/script with a hidden window from Task Scheduler.
https://github.com/asheroto/SpawnProcess
Last synced: 3 months ago
JSON representation
Spawns a new process from the command line without blocking execution. Made for Windows. Perfect for running a program/script with a hidden window from Task Scheduler.
- Host: GitHub
- URL: https://github.com/asheroto/SpawnProcess
- Owner: asheroto
- Created: 2020-11-29T09:23:57.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-09-28T13:29:17.000Z (about 1 year ago)
- Last Synced: 2024-06-18T00:39:11.943Z (5 months ago)
- Language: Visual Basic .NET
- Homepage:
- Size: 143 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - asheroto/SpawnProcess - Spawns a new process from the command line without blocking execution. Made for Windows. Perfect for running a program/script with a hidden window from Task Scheduler. (Visual Basic .NET)
README
# SpawnProcess
Quick and simple application that spawns a new process without blocking execution. A new process is started using shell execute. Ability to launch hidden window.## Installation
1. Download the latest EXEs from the releases.
2. Move both of the EXEs into `C:\Windows` (not required but is the easiest installation)
3. Launch from any directory by typing `SpawnProcess.exe` or `SpawnProcessHidden.exe`
4. **Note**: the process you spawn needs to end itself... if it doesn't end itself and you launch the program hidden, you will have to kill it with Task Manager to end it!## Usage
### Executable Name
|Program|Description|
|--|--|
|`SpawnProcess.exe`|Control over window style|
|`SpawnProcessHidden.exe`|Same as SpawnProcess, except when launched, such as from Task Scheduler, no window appears by default, and the launched process is also hidden.|### Command Line Arguments
|Argument|Required/Optional|Description|
|--|--|--|
|-path|Required|Path to Process|
|-args|Optional|Arguments for Process|
|-windowstyle|Optional|Hidden/Normal/Minimized/Maximized|
|-workingdirectory|Optional|Working Directory of Process|### Example #1
```powershell
SpawnProcess.exe -path "C:\Path\To\Process.exe" -args "-arg1 goesHere -arg2 goesHere" -windowstyle normal -workingdirectory "C:\Path\To"
```### Example #2
```powershell
SpawnProcess.exe -path "C:\Path\To\Process.exe"
```### Example #3
```powershell
SpawnProcess.exe -path "C:\Path\To\Process.exe" -args "-data -more" -windowstyle minimized
```### Example #4
```powershell
SpawnProcess.exe -path "C:\Path\To\Process.exe" -args "-data -more" -windowstyle hidden
```### SpawnProcessHidden example, such as from Task Scheduler Example
Paste this in the Program/Script field (change path as needed):```powershell
SpawnProcessHidden.exe -path "powershell" -args "-executionpolicy bypass -command ""V:\Path\To\YourScript.ps1"""
```and then click "OK", and then click "Yes" for the args to move into the "Add arguments" field.
Another example:
```powershell
SpawnProcessHidden.exe -Path "pwsh" -Args "-Command & 'C:\Projects\ChocolateyPackages\fxsound\update.ps1'" -WorkingDirectory "C:\Projects\ChocolateyPackages\ClickUp-Official"
```