Thread with 17 posts
jump to expanded posti had to add something to the PATH environment variable on Windows and i got the first few attempts wrong, and in the end had to look up how to do it... my pride... a thing my twenty-years-younger self could do, but not me... all these batch commands lost, like tears in rain...
it's not really that surprising however, over time
export PATH=$PATH:/foo/bar
would naturally supplant
set PATH=%PATH%;C:\foo\bar
simply because the former has vastly more day-to-day relevance to my life now; the last time i did the latter, it was on MS-DOS
i'm having a bit of a berenstain bears effect with believing that %variable% was surely never how MS-DOS did variable substitution (surely it's some newfangled Windows NT thing?!), but here it is in the MS-DOS 5.0 manual!
one of my whimsical life regrets is that, as a kid, i understood that batch was a programming language, but i couldn't figure out how to write anything useful with it, because i didn't know where to look for documentation. imagine, imagine, i could've been a batch programmer!
i suppose batch files were always far more limited in what they could do than even the most primitive unix environment, though? i'm not sure if you can even do arithmetic
APPENDING PYTHON TO MY PATH DIDN'T WORK BECAUSE IT HITS THE FAKE PYTHON.EXE BUNDLED WITH WINDOWS THAT BRINGS UP THE MICROSOFT STORE PAGE!!!
the tanks roll on redmond tomorrow. you have my word. there will be no quarter
while you're here, here's a useful tip:
you don't have to modify the global PATH on Windows! the familiar bash export
+ source
trick has an equivalent for batch files: you use set
and then run the batch file normally within a cmd
session. idk what to do for PowerShell
@hikari i actually find the fake python quite helpful, it works basically fine for glasgow purposes and is easier to install
@hikari if you’re going to bundle a fake python.exe that redirects to where to download a sanctioned python, why would you not simply bundle the sanctioned python in the first place
@0xabad1dea @hikari i think they did this with curl and it didn't work out well
@hikari the fake Python can be disabled somewhere in the Settings app. There’s a page like “App execution aliases” or something like that.
@hikari
They were! There was a plethora of different "batch extenders" that allowed you to do more, one of the most popular came with Norton Utilities. It even allowed you to make some TUI things — display dialog windows with buttons and other such things.
@m0xee ooh, very cool!
@hikari i wrote *so many* cursed batch files as a child
if errorlevel my beloathed
@whitequark @hikari Ever used Norton's Batch Enhancer? :)
@hikari If you're on new enough Windows, the environment variable editor is great, especially for %PATH%:
@jernej__s something i should've clarified in the initial tweet is i specifically did not want to do a global state alteration like this! i'm familiar with the gui but didn't want to resort to it.
nice to see they've made it friendlier in newer versions, god knows it was a pain for so long