stdrename_install_toggle.ps1 - limehawk/rmm-scripts GitHub Wiki
stdrename_install_toggle.ps1
Toggle installation of stdrename command-line file/folder renaming utility.
Overview
Toggles installation of stdrename - a command-line file/folder renaming utility. If installed, uninstalls it. If not installed, downloads and installs it. Installs to System32 for system-wide availability.
Purpose
Toggles installation of stdrename - a command-line file/folder renaming utility. If installed, uninstalls it. If not installed, downloads and installs it. Installs to System32 for system-wide availability.
Prerequisites
- Windows 10/11
- Admin privileges required (writing to System32)
- Internet connectivity for download
Configuration
Required Inputs
DownloadUrl: URL to download stdrename.exeInstallPath: Installation directory (default: System32)
Settings
- Downloads from GitHub releases (latest version)
- Installs to C:\Windows\System32 for PATH accessibility
- Toggle behavior: installed -> uninstall, not installed -> install
Data Sources & Priority
- Hardcoded values (download URL, install path)
- GitHub releases for stdrename
Behavior
- Checks if stdrename.exe exists in install path
- If exists: deletes the executable (uninstall)
- If not exists: downloads from GitHub and installs
Security Notes
- Downloads from official GitHub releases
- No secrets in logs
- Modifies System32 directory
Exit Codes
- 0: Success
- 1: Failure
Example Output
[ INPUT VALIDATION ]
--------------------------------------------------------------
Download URL : https://github.com/Gadiguibou/stdrename/releases/latest/download/stdrename.exe
Install Path : C:\Windows\System32
Exe Path : C:\Windows\System32\stdrename.exe
[ OPERATION ]
--------------------------------------------------------------
Checking for existing installation...
stdrename not found, downloading...
Download complete
[ RESULT ]
--------------------------------------------------------------
Status : Success
Action : Installed
[ SCRIPT COMPLETED ]
--------------------------------------------------------------
Version History
- 2025-11-29 v1.0.0 Initial Style A implementation
Links
- View Script Source
- Scripts - Back to script index