0

I have a batch script that deletes certain registry keys, it works as a script itself and also from the command line. However, as part of an uninstaller (Installshield), one of the 2 registry keys does not delete. My log file indicates that "the operation completed successfully" but for the life of me, the key is still there.

The command looks like this:

REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\ProgramName\SubEntry" /f

and my log file:

REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\ProgramName\SubEntry" /f

The operation completed successfully.

I can run the batch script itself as an admin and it works, I always run the installer (to install and uninstall) as an admin.

zb226
  • 9,586
  • 6
  • 49
  • 79
vee
  • 389
  • 5
  • 19
  • Is the key still present after logout/login or a reboot? –  Aug 15 '17 at 22:01
  • Yes, I suspect it has to do with the location since it's being called from a 32-bit application. Even if I'm not specifically calling it, it might be looking in the Wow6432Node – vee Aug 15 '17 at 22:06

1 Answers1

2

I fixed the issue. Since the installer is 32-bit, it was looking in the 32-bit entries in the registry (under WOW6432Node). By specifying /reg:64 at the end of my command it deleted the correct entry. I got the solution from this post.

vee
  • 389
  • 5
  • 19