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:
cproudlock
2025-12-12 08:43:42 -05:00
parent afad8e0c56
commit 2af9a9c558
2 changed files with 29 additions and 79 deletions

View File

@@ -19,87 +19,47 @@ This utility monitors a folder for DNC files and automatically strips specified
## Installation
1. Copy the project folder to your DNC workstation
2. Edit `eDNC-SpecialCharFix.ps1` to set your watch folder (default: `C:\Dnc_Files\Q`)
3. Run `Run-eDNCFix.bat` - it will auto-elevate to Administrator
1. Copy the project folder to `C:\eDNC-Fix\` on the DNC workstation
2. Run `Install-ScheduledTask.ps1` as Administrator
**Note:** The batch file automatically requests Administrator privileges via UAC prompt.
```
C:\eDNC-Fix\
├── eDNC-SpecialCharFix.ps1
├── Run-eDNCFix.bat
├── Install-ScheduledTask.ps1
└── README.md
```
### Run as Scheduled Task (Recommended)
For production use, install as a scheduled task that runs as SYSTEM with admin rights:
### Install as Scheduled Task (Recommended)
```powershell
# Run as Administrator
.\Install-ScheduledTask.ps1
# With custom settings
.\Install-ScheduledTask.ps1 -WatchFolder "D:\DNC\Programs" -FileFilter "*.nc"
C:\eDNC-Fix\Install-ScheduledTask.ps1
# To remove
.\Install-ScheduledTask.ps1 -Uninstall
C:\eDNC-Fix\Install-ScheduledTask.ps1 -Uninstall
```
This creates a task that:
The scheduled task:
- Starts at system boot (before any user logs in)
- Runs as SYSTEM with highest privileges
- Auto-restarts if it crashes
- Runs hidden (no console window)
- Watches `C:\Dnc_Files\Q` for `*.pun` files
### Run at User Login (Alternative)
### Run Manually (Alternative)
To run when a specific user logs in:
Double-click `Run-eDNCFix.bat` - it will auto-elevate to Administrator via UAC.
1. Press `Win + R`, type `shell:startup`, press Enter
2. Create a shortcut to `Run-eDNCFix.bat` in the Startup folder
## Configuration
## Usage
Default settings (edit `eDNC-SpecialCharFix.ps1` to change):
### Basic Usage
Double-click `Run-eDNCFix.bat` or run from PowerShell:
```powershell
.\eDNC-SpecialCharFix.ps1
```
### Custom Watch Folder
```powershell
.\eDNC-SpecialCharFix.ps1 -WatchFolder "D:\DNC\Programs"
```
### Different File Types
```powershell
.\eDNC-SpecialCharFix.ps1 -FileFilter "*.nc"
```
### Remove Additional Characters
```powershell
# Remove 0xFF, NULL, and SUB characters
.\eDNC-SpecialCharFix.ps1 -CharactersToRemove @(255, 0, 26)
```
### All Options
```powershell
.\eDNC-SpecialCharFix.ps1 `
-WatchFolder "C:\Dnc_Files\Q" `
-FileFilter "*.pun" `
-IncludeSubfolders $true `
-CharactersToRemove @(255)
```
## Parameters
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| WatchFolder | String | C:\Dnc_Files\Q | Folder to monitor |
| FileFilter | String | *.pun | File pattern to watch |
| IncludeSubfolders | Boolean | $true | Watch subdirectories |
| CharactersToRemove | Int[] | @(255) | Byte values to strip |
| Setting | Default | Description |
|---------|---------|-------------|
| WatchFolder | `C:\Dnc_Files\Q` | Folder to monitor |
| FileFilter | `*.pun` | File pattern to watch |
| IncludeSubfolders | `$true` | Watch subdirectories |
| CharactersToRemove | `@(255)` | Byte values to strip (0xFF) |
## Output