In my .bat file, I used the code:
setx /m path "%PATH%;%~dp0" %~dp0
to add the current directory of the .bat file to the system path.
But I can't use the cmd to run phantomjs.exe (in the same directory) until I go into my system settings and edit the path variable. I do not actually make any changes, just click edit then ok to apply the change.
What do I need to add to the script to allow me to run phantomjs.exe without the need of going into system settings?
EDIT: The laptop I'm using is a 32bit operating system and the change is not applied. I tested it on a 64bit operating system using the code setx /m path %PATH%%~dp0
and the change is applied straight away without having to open the path variable.
How can i make this work for a 32bit operating system?