bogs wrote: Tue Mar 03, 2020 11:09 am
@Richard - you seem to be focused on just the MB and MAC of the nic, and in the case of this OP's question that is sufficient
Being sufficient for this thread was indeed why I was focused on it in this thread.
but what Richmond, I, and all the others in the previous posting were looking for was more along the lines of what Mark figured out, how to get real information about (ALL) the real hardware on a system.
Mark's case is for licensing, which I STILL think is probably the predominant way the information is used is reason enough, but there are other test cases such as I brought up previously, like benchmarking, platform ability, compatibility, etc.
For all those and others, you can't take the least accurate view the Os itself provides, you need to know what the Os is running on.
Determining the OS and its version is already in the engine. And if the OS is misreporting other elements, that would be a bug in the OS for the OS vendor to fix, one that may be difficult for any outsider like the LC team to overcome.
I've never needed unique hardware-based identifiers (the subject of this thread), though I have frequently enjoyed having a system profile for my testers and customers (a very different topic that would make a very nice thread of its own).
So far, I've found most of the info relevant to sales and support needs obtainable with built-in features like OS version, LC engine version, screen size, free disk space, and in the old days even QuickTime version. I've considered adding RAM size to the mix, and for that I'd use shell calls, along with anything else I might dream up. There's so much code floating around in our community there's even a function in Michael Doub's Master Library for distinguishing when a laptop is running from battery or is plugged in. Lot's of options available for whatever mix of info you need.
Go ahead and submit a feature request. It takes only a minute.
But any engine request won't arrive in your hands today, while we can come up with a solution for just about any support-oriented information you'd need that aren't already in the engine (as you've demonstrated, there's a lot there already) using shell calls today.
The only thing that prevents you from enjoying the result you're looking for today is that the solution you seek would be in a script, and you've introduced the additional constraint of requiring that it be implemented specifically in the engine. For myself, I find that whenever I can avoid moving work from my desk to someone else's I get what I want exactly how I want it, and often sooner (see McConnell on the impact of communications in team workflows).
That said, from time to time I do submit requests that represent more convenience than utility-not-possible-in-scripting. But those cases are rare, and tend to be for things that most devs use every day. For example, obtaining detailed metadata about a single file has always been possible, but was cumbersome. Most of us have written functions for that so we can obtain it in a one-line call, but since nearly everyone will need that and the method for doing so may not be obvious to a new user, it seemed a useful suggestion or the team's work queue. Worked out well: it's now part of the core language.
System profiling is a different beast, in that the specific mix of info most useful to one business is likely to differ from another. Unlike file metadata, it's useful to only a smaller subset of apps, and mostly those made as part of a professional product deployment where the few minutes' work needed to script it is well worth the effort when it delivers exactly the information that particular org needs in the format that particular org finds most useful. Even if the engine provided a system profile, odds are it would require scripting to tailor its formatting for the unique needs of the organization using it - perhaps about as much time as using existing functionality to derive it would take, so not much of a savings to attempt a one-size-fits-all.
Now, you can say "Well, if you need it it is easy and you should be able to just shell out (in each instance of different Os) and get it", however it isn't that easy even to shell out on every Os. Even the better supported ones like OSX the shell doesn't always connect, for one thing.
See
Mark Weider's question in the post above this one.
The other way to put that is, if it is sooooooo easy to get, why is it soooooooo hard to just include it in the language?
See
Mark Weider's reply earlier, and
AxWald's reply from this morning.
PS: I find myself using "just" less in recent years, because putting it in front of something I want someone else to do for me doesn't actually make it any easier, but does make it appear so. In practice I find this alters priorities in ways that fall out of sync with business needs. In the example of system profile information, it moves work from easy-and-fun scripting to much-more-expensive C++, and comes with in-perpetuity documentation, maintenance, and support encumbrances not incurred when I write a one-off for myself. I've found few cases where omitting "just" from such clauses hasn't actually improved sober evaluation of the proposition. YMMV.