Inspector interrupted

(imported topic written by bearandy)

I create a analysis to filter the key word.

But sometimes result show inspector interrupted.

Is it too many key word to filter?

Any suggestion to improve the relevance

relevance code:

if exists file “wl.txt” of parent folder of regapp “besclient.exe” then ((item 1 of it) of it whose (item 0 of it = number of lines of file “wl.txt” of parent folder of regapp “besclient.exe”) of (multiplicities of it, it) of unique values of (item 1 of it as string) of it whose ((item 1 of it as string) does not start with (item 0 of it as string)) of ((lines of file “wl.txt” of parent folder of regapp “besclient.exe”) , unique values of (value “DisplayName” of it as string) of keys whose (exists value “DisplayName” of it AND exists value “UninstallString” of it AND not exists value “SystemComponent” of it AND (not exists value “ParentKeyName” of it or value “ParentKeyName” of it != “OperatingSystem”) AND (value “DisplayName” of it as string as lowercase does not contain “UPDATE” as lowercase) AND (value “DisplayName” of it as string does not contain “更新”) AND (value “DisplayName” of it as string as lowercase does not contain “Tivoli” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Zip” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “ACDSee” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “ATI” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Acer” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “ActiveX” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Adobe” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “ArcSoft” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “CIPS” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “CMS” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “CP_Package” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Camera” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Canon” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Card Reader” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “ClocX” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “DVD” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Dealing” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Digimax” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “DivX” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Driver” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “DynaDoc” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “EPSON” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “ESC” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “ESS” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “ESun” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “EXIM” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “EnsemblePro” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “FX” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “FinePix” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Firefox” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Fuji” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Google” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “HP” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Hot” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Hummingbird” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “HiNet” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “IBM” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Image” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Intel” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Internet Explorer” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “IrfanView” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Java” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “K-Lite” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “KB” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “KODAK” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “LANSA” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Language” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Lexmark” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Logitech” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Lotus” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “MSN” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Macromedia” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Messenger” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Microsoft” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Modem” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Module” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Nero” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Nikon” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Nokia” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “OLYMPUS” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Outlook” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “PC-Doctor” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Photo” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Panasonic” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Player” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “PChome” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “PDF” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “QFolder” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “QuickTime” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “RemoteCapture” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Reuters” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Runtime” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “S3” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “SafeNet” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Scan” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Seagate” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “SiS” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Sonic” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Sony” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “SoundMAX” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Symantec” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “TOSHIBA” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “ThinkPad” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Toolbar” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “TurboNote” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “TQC” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “UPMOST” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “USB” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “VNC” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Web” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “WinRAR” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Windows” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “XML” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “XviD” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “XnView” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “Yahoo!” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “creen” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “rade” as lowercase) AND (value “DisplayName” of it as string as lowercase does not contain “rystal” as lowercase)) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry)) else "File Not Found: " & pathname of parent folder of regapp “besclient.exe” & “\wl.txt”

Thanks for answer!

(imported comment written by Zakkus)

Hey Bearandy,

Can you define what you mean by “interupted”?

As far as the performance of the expression goes, there are a few things to note:

For your registry checks, you are looking up the the value “DisplayName” over and over again, which adds some cost. Here is that inner expression rewritten to only look up the displayname once, and the checks it against your list of names:

unique values of (value “DisplayName” of it as string) of keys whose (exists value “DisplayName” of it AND exists value “UninstallString” of it AND not exists value “SystemComponent” of it AND (not exists value “ParentKeyName” of it or value “ParentKeyName” of it != “OperatingSystem”) AND (not exists (value “DisplayName” of it as string as lowercase, (“update” ; “??” ; “tivoli” ; “zip” ; “acdsee” ; “ati” ; “acer” ; “activex” ; “adobe” ; “arcsoft” ; “cips” ; “cms” ; “cp_package” ; “camera” ; “canon” ; “card reader” ; “clocx” ; “dvd” ; “dealing” ; “digimax” ; “divx” ; “driver” ; “dynadoc” ; “epson” ; “esc” ; “ess” ; “esun” ; “exim” ; “ensemblepro” ; “fx” ; “finepix” ; “firefox” ; “fuji” ; “google” ; “hp” ; “hot” ; “hummingbird” ; “hinet” ; “ibm” ; “image” ; “intel” ; “internet explorer” ; “irfanview” ; “java” ; “k-lite” ; “kb” ; “kodak” ; “lansa” ; “language” ; “lexmark” ; “logitech” ; “lotus” ; “msn” ; “macromedia” ; “messenger” ; “microsoft” ; “modem” ; “module” ; “nero” ; “nikon” ; “nokia” ; “olympus” ; “outlook” ; “pc-doctor” ; “photo” ; “panasonic” ; “player” ; “pchome” ; “pdf” ; “qfolder” ; “quicktime” ; “remotecapture” ; “reuters” ; “runtime” ; “s3” ; “safenet” ; “scan” ; “seagate” ; “sis” ; “sonic” ; “sony” ; “soundmax” ; “symantec” ; “toshiba” ; “thinkpad” ; “toolbar” ; “turbonote” ; “tqc” ; “upmost” ; “usb” ; “vnc” ; “web” ; “winrar” ; “windows” ; “xml” ; “xvid” ; “xnview” ; “yahoo!” ; “creen” ; “rade” ; “rystal”)) whose (item 0 of it as lowercase contains item 1 of it))) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry

In my deployment this runs about twice as fast, and should be easier to maintain and update.

The second key part is that you have a tuple that is:

(, )

One of the keys to tuples is that they do a cross product of the two lists. This means that for every line of your file wl.txt, you go through and look up all those display name values again. I dont know what w1.txt looks like, but if it has alot of lines, then that is the reason why this expression runs so slowly. Here is the whole expression rewritten slighly to use sets, so that it only does all that registry work once:

if exists file “wl.txt” of parent folder of regapp “besclient.exe” then ((item 1 of it) of it whose (item 0 of it = number of lines of file “wl.txt” of parent folder of regapp “besclient.exe”) of (multiplicities of it, it) of unique values of (item 1 of it as string) of (elements of item 0 of it, item 1 of it) whose ((item 1 of it as string) does not start with (item 0 of it as string)) of ((set of (it as string) of lines of file “wl.txt” of parent folder of regapp “besclient.exe”) , unique values of (value “DisplayName” of it as string) of keys whose (exists value “DisplayName” of it AND exists value “UninstallString” of it AND not exists value “SystemComponent” of it AND (not exists value “ParentKeyName” of it or value “ParentKeyName” of it != “OperatingSystem”) AND (not exists (value “DisplayName” of it as string as lowercase, (“update” ; “??” ; “tivoli” ; “zip” ; “acdsee” ; “ati” ; “acer” ; “activex” ; “adobe” ; “arcsoft” ; “cips” ; “cms” ; “cp_package” ; “camera” ; “canon” ; “card reader” ; “clocx” ; “dvd” ; “dealing” ; “digimax” ; “divx” ; “driver” ; “dynadoc” ; “epson” ; “esc” ; “ess” ; “esun” ; “exim” ; “ensemblepro” ; “fx” ; “finepix” ; “firefox” ; “fuji” ; “google” ; “hp” ; “hot” ; “hummingbird” ; “hinet” ; “ibm” ; “image” ; “intel” ; “internet explorer” ; “irfanview” ; “java” ; “k-lite” ; “kb” ; “kodak” ; “lansa” ; “language” ; “lexmark” ; “logitech” ; “lotus” ; “msn” ; “macromedia” ; “messenger” ; “microsoft” ; “modem” ; “module” ; “nero” ; “nikon” ; “nokia” ; “olympus” ; “outlook” ; “pc-doctor” ; “photo” ; “panasonic” ; “player” ; “pchome” ; “pdf” ; “qfolder” ; “quicktime” ; “remotecapture” ; “reuters” ; “runtime” ; “s3” ; “safenet” ; “scan” ; “seagate” ; “sis” ; “sonic” ; “sony” ; “soundmax” ; “symantec” ; “toshiba” ; “thinkpad” ; “toolbar” ; “turbonote” ; “tqc” ; “upmost” ; “usb” ; “vnc” ; “web” ; “winrar” ; “windows” ; “xml” ; “xvid” ; “xnview” ; “yahoo!” ; “creen” ; “rade” ; “rystal”)) whose (item 0 of it as lowercase contains item 1 of it))) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry)) else "File Not Found: " & pathname of parent folder of regapp “besclient.exe” & “\wl.txt”

Again, i dont have w1.txt, so I couldnt’ actually test this, but i think this should work a lot better…

-Zak

(imported comment written by bearandy)

Thanks your help! It is useful.

I want to ask a question.

I used “does not contain” key word.

And you change it to “not exists (value “DisplayName” of it as string as lowercase, (“update” ; “??” ; “tivoli”…”

Is it the same just to filter by the key words?

(imported comment written by bearandy)

And the wl.txt is a list of applications like

Adobe Flash Player 10 ActiveX

Adobe Reader X (10.1.1) - Chinese Traditional

Avira AntiVir Personal - Free Antivirus

Corel DVD MovieFactory Lenovo Edition

Corel WinDVD

Create Recovery Media

Definition update for Microsoft Office 2010 (KB982726) 32-Bit Edition

FileZilla Client 3.5.1

.

.

.

I want to pick up the applications not in the list.

(imported comment written by bearandy)

I use your line of wl.txt method but list nothing.

the wl.txt content is not:

Adobe Flash Player 10 ActiveX Adobe Reader X (10.1.1) - Chinese Traditional Avira AntiVir Personal - Free Antivirus…

So how could I modify the relevance.

(imported comment written by Zakkus)

I tried the expression against a wl.txt that looked like the one you included, and got a list of application names… what are you expecting to see?

(imported comment written by bearandy)

I just want to list computer’s applications that is not in the wl.txt.

And original code didn’t join the key word:

if exists file “wl.txt” of parent folder of regapp “besclient.exe” then ((item 1 of it) of it whose (item 0 of it = number of lines of file “wl.txt” of parent folder of regapp “besclient.exe”) of (multiplicities of it, it) of unique values of (item 1 of it as string) of it whose ((item 1 of it as string) does not start with (item 0 of it as string)) of ((lines of file “wl.txt” of parent folder of regapp “besclient.exe”) , unique values of (value “DisplayName” of it as string) of keys whose (exists value “DisplayName” of it AND exists value “UninstallString” of it AND not exists value “SystemComponent” of it AND (not exists value “ParentKeyName” of it or value “ParentKeyName” of it != “OperatingSystem”)) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry)) else "File Not Found: " & pathname of parent folder of regapp “besclient.exe” & “\wl.txt”

It lines computer applications that is not in the wl.txt list.

I found that more lists in wl.txt more evaluate time like what you said.

How do I improve it?