5 ms·
> This naturally broke a stack of apps and scripts,and my expectations. A great example of why you should be using environment variables and the proper system
by wannacboatmovie 3y ago
> This naturally broke a stack of apps and scripts,and my expectations.
A great example of why you should be using environment variables and the proper system API calls to determine path locations, not hard coding them. But never let an opportunity to blame Microsoft for poor application code go to waste.
Sounds like your expectations are a bit low.
- atlas_hugged 3y agoReally dude? That’s your take?
- readthenotes1 3y agoDo you complain why your Tesla runs out of gas ? Seems like the same complaint to me.
- wannacboatmovie 3y agoSorry you ship code that's hard coded to C:\Crapware. It's unfortunate you think that's okay even though it violates conventions Microsoft has published for oh I don't know 30 years. Some people never learn.
- verall 3y agoI'm pretty sure that code which lands in C:\Crapware actually would not be affected by the above issue. I install all of my dev shit in C: anything else gives path length errors in MSVC anyways.
- ofslidingfeet 3y agoOh is there some kind of OneDrive API to help me "determine path locations" per Microsoft's preferences also?
- kimixa 3y agoAnd here I was thinking %HOMEDRIVE% %HOMEPATH% /were/ the "proper" variables to use. Or at least get to a location that I an responsible for the locations and addressing beyond that point. Please enlighten me on what should be used instead.
- wannacboatmovie 3y agohttps://github.com/MicrosoftDocs/win32/blob/docs/desktop-src/shell/knownfolderid.md https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src... You're welcome.
- kimixa 3y agoHow do you access this in a batch script? The only related env at the bottom I can see is %USERPROFILE% - which would have exactly the same problem