ReNamer nLite Addon — Step‑by‑Step Guide for Batch Renaming During Slipstreaming

ReNamer nLite Addon — Step‑by‑Step Guide for Batch Renaming During Slipstreaming

Overview

Use ReNamer as an nLite addon to automatically rename files (installers, drivers, hotfixes) while creating a slipstreamed Windows installation. This guide assumes Windows source files copied to a working folder and nLite + ReNamer (or ReNamer Lite) available.

What you need

  • Windows installation source copied to a folder (e.g., C:\WinSource)
  • nLite
  • ReNamer (portable or installed)
  • 7-Zip or similar (for making addons/ISOs)
  • Basic familiarity with nLite addon format (TrueAddon structure)

Steps

  1. Prepare addon folder structure

    • Create a folder for the addon, e.g., C:\nLiteAddons\ReNamerAddon
    • Inside it create the standard TrueAddon structure:
      • addon</li>
      • addon\files\ (place ReNamer executable and any required DLLs here)
      • addon\inf\ (contains install scripts like addon.inf or runonce entries)
      • autorun.inf or other control files as required by your addon creator
  2. Add ReNamer files

    • Copy ReNamer executable(s) into addon\files\ (use portable exe to avoid registry needs).
    • If you need a preset/rules file, include it in addon\files\ (e.g., rules.rnr).
  3. Create an installation wrapper (AutoIt/Batch/INF)

    • Create a small script inside addon\files\ that runs ReNamer with your batch rules silently.
    • Example approaches:
      • Use ReNamer CLI (if available) to apply a preset: ReNamer.exe /run rules.rnr
      • Use a batch file that launches ReNamer and waits, then exits.
    • Place a call to that script in addon\inf\addon.inf or in RunOnce setup so it executes during Windows setup.
  4. Define run-time target and behavior

    • Ensure script targets the correct folder where integrated files are during setup (use relative paths).
    • If renaming files inside the Windows source before image creation, run the addon installer on the build machine to modify C:\WinSource directly (preferred).
    • If running during Windows setup, ensure the script runs with sufficient privileges and paths map correctly (setup context differs).
  5. Prepare ReNamer rules (batch rename logic)

    • Create rules for the rename sequence you need: replace, regex, add serial numbers, change extensions, remove brackets, etc.
    • Save rules as a preset (rules.rnr) so the CLI or scripted run can apply them deterministically.
    • Test rules on sample files first.
  6. Test on build machine (preferred)

    • Copy addon files into a temporary folder and run your wrapper script manually against a copy of the target files (e.g., the installers folder).
    • Verify renamed results and adjust rules until correct.
  7. Package as nLite TrueAddon

    • Zip the addon folder (maintaining addon\files and addon\inf).
    • Rename .zip to .zip or .rar according to nLite addon format, or use an addon creator tool to produce a TrueAddon (.zip/.rar accepted).
  8. Integrate with nLite

    • Run nLite, point to your Windows source folder.
    • On the Addons step, add your ReNamer addon.
    • Continue through nLite to create the slipstreamed image or burn ISO.
  9. Validate final ISO / installation

    • Mount or burn the ISO and inspect the files that should have been renamed.
    • If the addon runs during setup instead of pre-processing, perform a test install in a VM and confirm renaming occurred during setup.

Troubleshooting (brief)

  • Renamer not running during setup: switch to pre-processing on the build machine (run script against source) — more reliable.
  • Path mismatches: use absolute paths on build machine; if running in setup, detect installation drive (e.g., %SystemDrive%) in script.
  • Permission failures: ensure scripts run elevated (setup context usually has system privileges).
  • Rule errors: test rules in ReNamer UI and preview before applying.

Example minimal batch script (concept)

bat

@echo off rem Run ReNamer preset against target folder cd /d “%~dp0” ReNamer.exe /run “%~dp0\rules.rnr” “%~dp0\target_folder”

(Adapt paths and CLI options to actual ReNamer version; test first.)

Final tips

  • Prefer applying renames on the build machine (pre-integration) rather than at install time.
  • Keep a backup of original files before batch renaming.
  • Use deterministic presets and test thoroughly in a VM.

If you want, I can produce a ready-to-use addon folder structure and an example rules.rnr matching a specific rename pattern — tell me the exact rename pattern to implement.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *