I am running the following task to delete a registry key but receive a not relevant message when the job runs. The key actually exists in my HKCU. I am testing on my laptop with myself logged in. I am hoping someone can assist as I need to delete this key which is a Uesr DSN and replace it with a System DSN key in the HKLU. Thanks.
delete __appendfile
delete rescuelink.reg
appendfile Windows Registry Editor Version 5.00
appendfile
http://-HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sources\RescueLink
1 targeted computer reported this action non-relevant.
My relevance in the task itself is:
(name of operating system = “Win2000” OR name of operating system = “WinXP” OR name of operating system = “WinXP-2003” OR name of operating system = “WinXPe” OR name of operating system = “Win2003” OR (name of it = “WinVista” and product type of it = nt workstation product type) of operating system OR (name of it = “Win2008” or (name of it = “WinVista” and product type of it != nt workstation product type)) of operating system OR name of operating system = “Win2008R2” OR name of operating system = “Win7”) AND (exists value “Rescuelink” of key “HKEY_USERS\S-1-5-18\Software\ODBC\ODBC.INI\ODBC Data Sources” of native registry)
Ben I was able to resolve this. Here is the code anyone else having the same issue deleting ODBC User DSNs in the registry:
Relevance:
(exists x32 registry AND NOT exists x64 registry) AND (name of operating system = “WinXP” OR name of operating system = “WinXP-2003”) AND exists values “Rescuelink” of keys “Software\ODBC\ODBC.INI\ODBC Data Sources” of current user keys (logged on users) of registry
Action:
action uses wow64 redirection false
delete __createfile
delete deleterescuelink.reg
createfile until @end_create_reg_file
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Sources]