Want plural but get singular values

(imported topic written by RP12)

Hi,

I’m trying to pull out the “uninstallstring” values from the registry on similarly named software.

I can get the uninstall string results, but I also get the “%00” percent. I tried the "preceding text of last “%00”, but it only gives a singular result, not plural.

Q: (values “uninstallstring” of keys whose ((exists value “displayname” whose (it as string as lowercase contains “example”) of it)) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry as string)

A: MsiExec.exe /X{0DFBEA9F-98CC-4852-BE71-4DD69207E6BC}%00

A: MsiExec.exe /X{F144586E-A989-4F40-B25A-C1EA8FAA35D1}%00

A: MsiExec.exe /X{FC05F92F-9024-420D-B033-0416C63C6C6A}%00

Q: preceding text of last “%00” of (values “uninstallstring” of keys whose ((exists value “displayname” whose (it as string as lowercase contains “example”) of it)) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry as string)

A: MsiExec.exe /X{0DFBEA9F-98CC-4852-BE71-4DD69207E6BC}

E: Singular expression refers to non-unique object.

Any ideas?

Thanks,

Rick

(imported comment written by NoahSalzman)

Ahh… relevance plurals… how much we love thee. :slight_smile:

Try "preceding texts of lasts … "

(imported comment written by RP12)

Hi Noah,

Maybe I’m missing something but, I did that in my second relevance example of the initial post.

I tried “preceding text of lasts…”, “preceding texts of lasts” , “preceding texts of last”

It only gives singular, and I’m hunting for the plural. :slight_smile:

(imported comment written by NoahSalzman)

I did cheat a little, I did not try it with your full phrase, I just did this:

q: preceding texts of lasts “%00” of (values “uninstallstring” of keys of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry as string)

A: MsiExec.exe /I{01F81577-D786-49D7-BAAF-B8A8B44CE251}

A: MsiExec.exe /I{034E061B-B3A3-4123-842E-10C1B6B3C8C7}

A: MsiExec.exe /X{03D1988F-469F-4843-8E6E-E5FE9D17889D}

Need to dig a little more to figure this one out.

(imported comment written by NoahSalzman)

Maybe this will work for you?

q: preceding texts of lasts “%00” of (values “uninstallstring” of keys whose (exists value “displayname” of it and value “displayname” of it as string contains “Adobe”) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry as string)

A: MsiExec.exe /I{A2BCA9F1-566C-4805-97D1-7FDC93386723}

A: MsiExec.exe /I{AC76BA86-7AD7-1033-7B44-A91000000001}

T: 3.876 ms

I: plural substring

(imported comment written by RP12)

Thanks Noah,

Your example work fine, and is cleaner.

I thought I messed up with the “preceding texts…” but it was in the "…as string contains “example” it didn’t like my lack of Capitlization. I changed it to “as string as lowercase contains”

Thanks for your help on a Friday afternoon.