As a warning, this is my first time using bash so I am learning everything here.
I am trying to create an installer that will make it easy to deploy from a thumb drive. My problem is that after I install Python 3(I have the exe file in the same folder), once it moves on to my dependencies, I get this error:
If I rerun the same bash file and ignore or reinstall python, they install properly using pip.
It is as if the cmd tab is using the paths that were present when opened. Is there a way to update them? Or is there a better way to do this?
As a note, all our laptops are Windows 11 now so I am testing using Oracles VM VirtualBox with Windows 11 home fully updated and a snapshot so that I can start over in a fresh environment if it fails. This has saved so much time. This problem also occurred when trying on a real laptop(not VM).
Bash file:
@echo off title My Test Installer pushd %~dp0 set script_dir=%CD% popd echo Copying files from %script_dir% to C:\TestFolder xcopy %script_dir% c:\TestFolder /s /e /i echo Ok Windows security pop-up. pause echo Installing Python.... start /wait c:\Tearoffs\python-3.11.4-amd64.exe /quiet InstallAllUsers=1 Include_test=1 Include_tcltk=1 Include_pip=1 PrependPath=1 AppendPath=1 echo Finished installing Python pause echo Installing xlrd(Excel document reader).... start pip install xlrd wait echo Installing fpdf(PDF maker).... start pip install fpdf wait echo Installing fpdf2(PDF maker extention).... start pip install fpdf2 wait echo Installing escpos(Reciept printer controller).... start pip install python-escpos wait echo Installation complete echo Creating shortcut on desktop echo F| xcopy %script_dir%\TestShortcutWithIcon.lnk %userprofile%\OneDrive\Desktop\TestShortcutWithIcon.lnk /q pause
@madmisha It's been a while since I messed with bash and windows, but I have a vague memory of similar problems that I solved with fully qualified path names. The short answer to your question is yes, the paths can be updated. I forget the exact syntax but conceptually it's $PATH$ concat to MyNewPaths.
Hope that's of some help.
EDIT There is a different 'path' variable depending on something I can't recall but if what is not working is locating an executable then just spelling out the full path will fix it.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.