Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refresh cmd environment with a command

I have a problem with a batch file I use to deploy software on new computers.
For example, I install Python 2.7, and next I would like to upload pip to install all libraries. My batch return the error could not update pip , python is not recognize as internal command or batch. I have to close the script and reopen it.

Is there a way to refresh my cmd environment without closing it ?

I am not English so I hope you will understand me.

I am under Windows 7 PRO 64 bits and I use cmd.exe.

like image 245
Pixi Avatar asked Aug 18 '26 12:08

Pixi


1 Answers

I had a similar issue I was trying to automate initial installation on win 7. I first updated the environment variable so when ever I log into the system the paths are updated. Then I changed the current path variable in cmd session:

setx /M path "%path%;C:\path\to\your\exe"
set path="%path%;C:\path\to\your\exe"
like image 171
Sheece Gardazi Avatar answered Aug 21 '26 10:08

Sheece Gardazi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!