Monday, October 26, 2020

#1 2020-02-08 09:17:24 am

Yvan Koenig
Member
Registered: 2006-09-14
Posts: 4570

problem with "system_profiler SPApplicationsDataType" which returns ""

I tried to run an old script which worked in the past.
As it gave an odd result I studied its different parts and discovered the problem.
Here is the stripped code:

Applescript:

set startTime to (time of (current date))

set fullReport to do shell script "system_profiler SPApplicationsDataType"

set executeTime to (time of (current date)) - startTime

It take 3 minutes to return "" which is really not what I was assuming to get.

Am I doing something wrong ?


I just discovered that when I try to get System Infos from the apple menu and ask for "Applications" I get : "Le module n’a pas répondu suffisamment rapidement lors du recueil de ces informations."

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) samedi 8 février 2020  16:17:03

Last edited by Yvan Koenig (2020-02-08 09:26:18 am)

Offline

 

#2 2020-02-08 09:33:21 am

Fredrik71
Member
Registered: 2019-10-23
Posts: 416

Re: problem with "system_profiler SPApplicationsDataType" which returns ""

What time do you get in Terminal ??

I got less 20sec on my MacBookPro from 2012

Yvan Koenig wrote:


It take 3 minutes to return "" which is really not what I was assuming to get.


I could teach you to cook but I couldn't do anything if you do not have desire or commitment for it.

Offline

 

#3 2020-02-08 09:40:53 am

KniazidisR
Member
Registered: 2019-03-03
Posts: 1352

Re: problem with "system_profiler SPApplicationsDataType" which returns ""

4 seconds and one fine full report on my Mojave system. Tested your script as is.

Last edited by KniazidisR (2020-02-08 09:43:29 am)


Model: MacBook Pro
OS X: Catalina 10.15.4
Web Browser: Safari 13.1
Ram: 4 GB

Offline

 

#4 2020-02-08 09:43:50 am

peavine
Member
From:: Prescott, Arizona
Registered: 2018-09-04
Posts: 644

Re: problem with "system_profiler SPApplicationsDataType" which returns ""

2 seconds here. I ran Yvan's script from within Script Editor, and rebooted before doing that.  The application-data output was as expected.

Last edited by peavine (2020-02-08 01:46:35 pm)


2018 Mac mini - macOS Catalina

Offline

 

#5 2020-02-09 09:14:25 am

Yvan Koenig
Member
Registered: 2006-09-14
Posts: 4570

Re: problem with "system_profiler SPApplicationsDataType" which returns ""

Thank you to all of you.

I got the explanation.

I didn't took care that several external HD were connected to my iMac and I forgot that the triggered instruction search the applications available in every attached devices.
Now the extraneous devices are gone.
The script scans only the two mounted devices : the SSD from which I boot and the internal mechanical HD.
Now it took 38 seconds.
I found no way to search only in the SSD.

Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) dimanche 9 février 2020  16:13:54

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)