Last of type error in registry relevance

Hi, I’ve done some digging in the forums before asking here but here is my issue:

In the Registry we have a value “Folder” in a key “HKLM\Software\Product\Version” which lists the location in which a folder is created “C:\Foo\Bar\123456”. The 123456 portion of the directory path is what I need, and the folder path preceding this can be different. I started writing a relevance :
value “Folder” of keys “HKLM\Software\Product\Version” of native registry

and that returns the full path “C:\Foo\Bar\123456”

However, when I try something like “last 6 of value “Folder” of keys “HKLM\Software\Product\Version” of native registry” I get a Type error.

Can someone help me by pointing me in the right direction, or help explain how to properly use “last # of”?


Do you get better result if you do following?
last 6 of ((value "Folder" of keys "HKLM\Software\Product\Version" of native registry) as string)

1 Like

yeah… that seems to have been my issue. I didn’t put the result as a string.