Skip to content

๐Ÿ“Œ A deployable tool to add or remove values from the Windows PATH variable.

License

Notifications You must be signed in to change notification settings

awaescher/PathEd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

windows PathEd

Without PathEd, it can be quite cumbersome to handle the old-school semicolon-devided PATH variable safely.

PathEd has no dependencies besides the .NET Framework 2.0 and can be deployed with any installer, for example. Editing the PATH within your setup is just one single exec command instead of using proprietary PATH manipulation plugins, etc.

Examples

Add a value to the Windows PATH:

PathEd.exe add "C:\Program Files\RepoZ"

Remove a value from the Windows PATH:

PathEd.exe remove "C:\Program Files\RepoZ"

Usage in a NSIS install script:

PathEd is used in the RepoZ NSIS install script to add and remove the application location to the Windows PATH.

Noteworthy

PathEd will ...

  • ... just add values if they are new to the PATH. So it can be called multiple times.
  • ... ignore removals if the value is not part of the PATH. So it can be called multiple times as well.
  • ... compare values against the PATH (whether it should add or can remove values) case-insensitive.
  • ... remove values even if the PATH defines them in quotes.

As always, you'll need to add quotes to the value if it contains spaces (like shown in the examples). Otherwise, Windows will split them up as multiple arguments.

About

๐Ÿ“Œ A deployable tool to add or remove values from the Windows PATH variable.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages