Relevance Sub in Action Script

(imported topic written by Vosh)

In fixlet debugger (9.0.787) II’m trying to write a task that will delete a registry key (and subkeys) but I keep get an error.

Here’s what I’m trying to make happen:

delete __appendfile

delete C:\Temp\regdel.reg

appendfile Windows Registry Editor Version 5.00

appendfile [-{pathname of key “Software\RealNetworks” of current user keys (logged on users) of registry}]

move __appendfile C:\Temp\regdel.reg

I’ve tried writing this with }} at the end as well with no luck as well.

STATUS: Running action…

Command succeeded delete __appendfile

Command succeeded delete No ‘C:\Temp\regdel.reg’ exists to delete, no failure reported

Command succeeded appendfile Windows Registry Editor Version 5.00

Command failed (Relevance substitution failed) appendfile [-{pathname of key “Software\RealNetworks” of current user keys (logged on users) of registry}]

Command failed (Relevance clauses must be surrounded by { and } guards.) appendfile [-{pathname of key “Software\RealNetworks” of current user keys (logged on users) of registry}]

(imported comment written by NoahSalzman)

“Relevance substitution failed” can mean that the relevance line returned an error.

q:
(pathname
of
key
"Software\RealNetworks"

of
current user keys (logged on users)
of
registry)

E:
The expression could not be evaluated: Windows Error 00000522: A required privilege is not held by the client.

If you insert this (error causing) relevance you will get the same issue:

q:
(pathname
of
key
"foo"

of
key
"HKLM"

of
registry)

E:
Singular expression refers to nonexistent object.

But if you just put in something simple as a test – (key “HKLM” of registry) – your script will work.

(imported comment written by Vosh)

I had actually figured it out and just failed to post it yet. I didn’t need anything for the HKLM part though, I was mainly focusing on remnants left in the HKCU or HUSERS. This is what I went with below.

delete __appendfile

delete regdel.reg

appendfile Windows Registry Editor Version 5.00

appendfile [-HKEY_USERS{component string of sid of security account (name of current user)}\Software\RealNetworks]

move __appendfile regdel.reg

wait regedit /s regdel.reg