Re: Getting Computer and OS Info

2017-07-15 Thread Jeremy Roussak via 4D_Tech
Fair enough: it wasn’t speedy, but how often are you doing it? A single regex to extract the stuff was pretty cool, though, I thought (although the $ in the middle was superfluous). I do like them. Jeremy Jeremy Roussak j...@mac.com > On 15 Jul 2017, at 16:49, Cannon Smith via 4D_Tech <4d_t

Re: Getting Computer and OS Info

2017-07-15 Thread Cannon Smith via 4D_Tech
Hi Jeremy, Thanks for the code. I started out using system_profiler but found it was too slow for my purposes. I ended up using sysctl and sw_vers on the Mac side which got me what I wanted and it very fast. Thanks. -- Cannon.Smith Synergy Farm Solutions Inc. Hill Spring, AB Canada 403-626-323

Re: Getting Computer and OS Info

2017-07-14 Thread Jeremy Roussak via 4D_Tech
Canon, This seems to work, on my MacBook at any rate. Can’t help with Windows. C_TEXT($in;$out;$pattern;$model;$swVersion) LAUNCH EXTERNAL PROCESS("/usr/sbin/system_profiler SPHardwareDataType SPSoftwareDataType";$in;$out) ARRAY LONGINT($starts;0) ARRAY LONGINT($lens;0) $pattern:="(?m)Model Na

Re: Getting Computer and OS Info

2017-07-14 Thread Bruno LEGAY via 4D_Tech
Hi, On Windows you can use "wmic" to access this kind of information (LEP). On Mac OS X you can use "system_profiler" (LEP). I'll send you some sample code to do this. HTH Bruno ** 4D Internet Users Group (4D iNUG) FAQ: http:

RE: Getting Computer and OS Info

2017-07-13 Thread Timothy Penner via 4D_Tech
And to get the model name on Windows you can use WMIC like this: WMIC CSPRODUCT GET NAME http://www.microcenter.com/tech_center/article/6090/how_to_find_your_computer_model_number_in_windows_8 -Tim ** 4D Internet Users Group

RE: Getting Computer and OS Info

2017-07-13 Thread Timothy Penner via 4D_Tech
> Not sure about the Model Name. Try this on Mac: http://kb.4d.com/assetid=48861 Not sure about Windows... -Tim ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.

RE: Getting Computer and OS Info

2017-07-13 Thread Timothy Penner via 4D_Tech
, July 13, 2017 10:11 AM To: 4D iNug Technical Cc: Cannon Smith Subject: Getting Computer and OS Info I’d like to programmatically get two pieces of system information from within 4D. 1. Model name. Ex. "MacBook Pro" or "Inspiron 24 3000". 2. OS Version. Ex. "Windows 7.1 SP

Getting Computer and OS Info

2017-07-13 Thread Cannon Smith via 4D_Tech
I’d like to programmatically get two pieces of system information from within 4D. 1. Model name. Ex. "MacBook Pro" or "Inspiron 24 3000". 2. OS Version. Ex. "Windows 7.1 SP2" or "macOS 10.12.5" It needs to work for both platforms. Does anyone have some code to do this they wouldn’t mind sharing