Simplify installation: C:\eDNC-Fix\, hardcoded defaults
- Install location: C:\eDNC-Fix\ - Watch folder: C:\Dnc_Files\Q (hardcoded) - File filter: *.pun (hardcoded) - Removed redundant parameters from installer - Streamlined README 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,22 +10,14 @@
|
||||
- Runs whether user is logged on or not
|
||||
- Automatically restarts if it stops
|
||||
|
||||
.PARAMETER WatchFolder
|
||||
The folder to monitor. Default: C:\Dnc_Files\Q
|
||||
|
||||
.PARAMETER FileFilter
|
||||
File pattern to watch. Default: *.pun
|
||||
Monitors: C:\Dnc_Files\Q for *.pun files
|
||||
|
||||
.PARAMETER Uninstall
|
||||
Remove the scheduled task instead of installing.
|
||||
|
||||
.EXAMPLE
|
||||
.\Install-ScheduledTask.ps1
|
||||
Installs with default settings
|
||||
|
||||
.EXAMPLE
|
||||
.\Install-ScheduledTask.ps1 -WatchFolder "D:\DNC\Programs" -FileFilter "*.nc"
|
||||
Installs with custom folder and filter
|
||||
Installs the scheduled task
|
||||
|
||||
.EXAMPLE
|
||||
.\Install-ScheduledTask.ps1 -Uninstall
|
||||
@@ -33,8 +25,6 @@
|
||||
#>
|
||||
|
||||
param(
|
||||
[string]$WatchFolder = "C:\Dnc_Files\Q",
|
||||
[string]$FileFilter = "*.pun",
|
||||
[switch]$Uninstall
|
||||
)
|
||||
|
||||
@@ -60,8 +50,8 @@ Write-Host "========================================================" -Foregroun
|
||||
Write-Host ""
|
||||
Write-Host " Task Name: $TaskName"
|
||||
Write-Host " Script: $ScriptPath"
|
||||
Write-Host " Watch Folder: $WatchFolder"
|
||||
Write-Host " File Filter: $FileFilter"
|
||||
Write-Host " Watch Folder: C:\Dnc_Files\Q"
|
||||
Write-Host " File Filter: *.pun"
|
||||
Write-Host ""
|
||||
|
||||
# Remove existing task if present
|
||||
@@ -72,7 +62,7 @@ if ($existingTask) {
|
||||
}
|
||||
|
||||
# Build the PowerShell command
|
||||
$Arguments = "-NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File `"$ScriptPath`" -WatchFolder `"$WatchFolder`" -FileFilter `"$FileFilter`""
|
||||
$Arguments = "-NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File `"$ScriptPath`""
|
||||
|
||||
# Create the scheduled task
|
||||
$Action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument $Arguments -WorkingDirectory $PSScriptRoot
|
||||
|
||||
Reference in New Issue
Block a user