6 ms·
On Windows Golang defaults to install to C:\. Had no problems running it from Program Files instead. It's crazy that a new programming language cannot follow de
by proactivesvcs 8y ago
On Windows Golang defaults to install to C:\. Had no problems running it from Program Files instead. It's crazy that a new programming language cannot follow decades-old conventions!
- marcosdumay 8y agoPython did this until very recently too. Windows has a problem, because people expect to use those programs in the command line and the %PATH% has a size limit and is a bit difficult to set-up properly.
- wongarsu 8y agoThe sum of the length of all environment variables has to be below 32767 characters. That doesn't seem like a good excuse to save 14 characters by putting your program's folder in C:/ instead of C:/Program Files/ If you do deeply nested paths (as npm used to do) then you can run against the old MAX_PATH limit that limits paths to 260 characters, but the correct solution is to either choose a flatter directory structure or use the newer APIs that allow paths with 32,767 characters.
- airstrike 8y agoC:\ isn't protected by UAC like C:\Program Files, though
- wongarsu 8y agoSteam is doing just fine writing into C:\Program Files (x86)\Steam\steamapps from an unpriviledged process. It just gives all users full rights over that folder. (whether that's a great idea is a different question, but UAC isn't a problem if you just set your access rights correctly)
- airstrike 8y agoThis assumes the user had admin privileges to begin with
- wongarsu 8y agoIf the user never had admin priviledges then you can't install in C:\ either and the program should just install in AppData\Local (as my sibling poster correctly stated)
- WorldMaker 8y agoSteam has definitely been handling Program Files wrong for as long as Program Files has existed. It's a marvel that there isn't more historic Malware intentionally targeting Steam install paths, though it looks like that storm is brewing on the horizon as I've seen references to such malware in the process of becoming a problem. Steam should have worked to figure out a better approach to UAC years ago. At this point it is one of several big tech debt issues with Steam that has my confidence in Valve at an all time low as a consumer.
- pjmlp 8y agoThe correct place to install local user apps is C:\Users\username\AppData\Local Or even better to work with localization %LOCALAPPDATA%
- gesman 8y agoI always add C:\U to my Path and store all standalone executable programs to C:\U I also have C:\CMD for my own batch files. Every single program should be fully contained in its own directory including all the settings,logging,configuration etc... No touching of any common resource or repository. It should be enough to delete single tree to fully uninstall program with all the garbage it created along the way
- teknopaul 8y agoMost people like to separatly store data and executables for good reasons.
- gesman 8y ago\Programs\VendorX\ProgramY\data \Programs\VendorX\ProgramY\code
- WorldMaker 8y agoThe problem there is "how lazy is VendorX"? With \Program Files\ Microsoft has a ton of top level ACLs to lock down access to the directories that everything just inherits by default. How much work does the OS need to do to allow something like "folders named `data` under \Programs\ have ACLs XData and `code` have ACLs YCode"? Does it need to watch for silly mistakes like Devs that localize `code` (`Código` for instance) or misspell it (`ocde` or `coode`)?
- Falkon1313 8y agoAlso would make it easier to backup the program and its data or copy them to a new system. But it seems because of the idea that some people may want to back up data and config separately, we end up with stuff scattered everywhere, with some even hidden away in the Windows Registry. Makes backups ridiculously complex.
- nneonneo 8y agoI always thought it was because that space in “Program Files” was troublesome for a lot of programs, particularly command-line ones. IIRC, older versions of MinGW for instance would simply not work at all if installed in a path containing a space, because some of their startup scripts didn’t properly quote all parts of the path.
- proactivesvcs 8y agoThe last time I went near MingW I think I came across that very problem. Suffice it to say I backed off slowly and didn't go back!