My below .bat file add MySQL's bin directory to system PATH though the old PATH values get duplicated.
@echo off
set pathMySQL=C:\xampp\mysql
set p=%%
setx MYSQL_HOME "%pathMySQL%"
setx PATH "%p%MYSQL_HOME%p%\bin;%PATH%"
I expect the PATH value after this execution to be as below.
%MYSQL_HOME%\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin
The actual value is as below - paths are repeated twice
%MYSQL_HOME%\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;
What I did wrong? How can I get over this?