I am trying to delete a default registry key value for the Local_Machine on a Windows 7 - 64bit machine. I have tried using credentials and not using credentials and will get an error Registry access failed. I then tried using the path with the \ at the end to access the default and get an invalid parameter warning. I have talked to supoprt and our trainer and no one has been able to assist me with this. We have just started using Kaseya and am not sure if I should be setting variables or what is going on. Any assistance and suggestions would be appreciated. I need to delete out the default registry key so it is set at (value not set) instead of the default path that is set there.
Credentials are likely not the issue. This is caused by registry redirection since the agent itself is a 32-bit application. For a list of what keys are redirected, check here: msdn.microsoft.com/.../aa384253(v=vs.85).aspx
As far as dealing with 64-bit keys, we have to get tricky sometimes. For example, we can run commands in a 64-bit command prompt like this:
(Execute Shell Command) %WINDIR%\sysnative\reg.exe delete HKLM\Software\Example /f
...that way REG.EXE runs as a native 64-bit application and will NOT get redirected to HKLM\Software\Wow6432Node\Example
thanks for the quick response. I tried to execute the shell command as you noted and it says it runs successfully however when I go look at the registry on my test machine it didn't actually delete it.
I found the culprit...I was trying to delete from ..\Windows NT\... and I needed quotes around the key name and use /ve switch to delete the default key. Thanks for pointing me in the right direction!
Ahhh... the quotes. Those are important too. ;)