Skip to content

stdrename_install_toggle.ps1

Corey Watson edited this page Dec 19, 2025 · 1 revision

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.exe
  • InstallPath : 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

  1. Hardcoded values (download URL, install path)
  2. GitHub releases for stdrename

Behavior

  1. Checks if stdrename.exe exists in install path
  2. If exists: deletes the executable (uninstall)
  3. 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

Clone this wiki locally