Command File - Disabling Services/deleting reg keys

Trying to run a cmd file in SWD for disbling services and del reg keys. When I run the cmd via BigFix it disables the services successfully but doesn’t delete the reg key. Only one reg key exists depending on the OS type. I switched it around to see if it fails when the reg keys are ran first, and it still diabled services but not deleting the reg key.

Took the same file and ran it locally and it ran with no issues.

Can anyone help with this?

CMD File:

sc config “rma” start= disabled
sc stop “rma”

sc config “Radstgms” start= disabled
sc stop “Radstgms”

sc config “radexecd” start= disabled
sc stop “radexecd”

sc config “radsched” start= disabled
sc stop “radsched”

reg delete “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run” /v RadTrayIcon /f

reg delete “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run” /v RadTray /f

reg delete “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run” /v RUNRADTRAY /f

reg delete “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run” /v RunRadTray /f

32-bit redirection.

Try “action uses wow64 redirection false” before running the script.

So this the correct way you’re suggesting? Still isnt working.

action uses wow64 redirection false

sc config “rma” start= disabled
sc stop “rma”

sc config “Radstgms” start= disabled
sc stop “Radstgms”

What is the full content of your action? I think it should work if you do the following:

action uses wow64 redirection false waithidden sc config rma start= disabled waithidden net stop rma waithidden sc config Radstgms start= disabled waithidden net stop Radstgms

I didn’t include the whole action in the reply. The disabling services I don’t have a problem with. That part works fine. It’s just the deleting registry keys that isn’t working. It’s coming back completed with exit code 0 now, but it’s not deleting the associated registry key.

I’m using

Regdelete “[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]” “RadTrayIcon”

But it’s just not deleting it.

Regdelete operates on the 32-bit registry (HKLM\Software redirects to HKLM\Software\Wow6432Node).

Use regdelete64 instead, and don’t use the hyphen on the key name - see https://www.ibm.com/support/knowledgecenter/SS2TKN_9.2.0/com.ibm.tivoli.tem.doc_9.2/Platform/Action/c_regdelete64.html

Thanks. That worked.