Quote:
Originally Posted by sethradio
I will only use this if I am writing a command line tool. This allows users of a program to not have to type the full path to the executable.
|
You should at least ask the user whether he wants your tool to be added to his PATH.
As an alternative you can add a shortcut to the Startmenu that opens a console with your tool added to the PATH, instead of adding your tool to the PATH globally. Many applications, like Visual Studio or GIT, use this technique.
The command for the Startmenu shortcut could be something like:
%comspec% /k ""$INSTDIR\setpath.bat""
And the "setpath.bat" could be created on-the-fly by the installer and should look like:
code:
@echo off
echo Setting up environment for Super Duper Tool...
set "PATH=C:\Path To Your Tool;%PATH%"