0

Hello want to use wmic to unistall a program the problem is that the program is stored in:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

And wmic can only view by default:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall

Can you find a way to unistall apps in:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

using wmic?

I have seen some posts regarding this problem:

Also found this might be helpfull:

I really need to use wmic for uninstall the program can anyone help me? Can anyone create a small function in cpp to set WMIC on HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall as default?

I know it is hard, any help would be great!!!

Community
  • 1
  • 1
cpherx
  • 41
  • 1
  • 8
  • 1) Don't you have any files like Unistallation exe , Uninstall.bat ?. 2) Can you able to see the file name in "add/remove" programs ? 3) Did you tried uninstall by name. ( by specifying name of the application ) – ban Feb 06 '17 at 12:17
  • well probably yes but since i have alot of computer on network its alot more easy to uninstall the program using wmic than do it one by one would be very long and painfull to do it 1) probably yes 2) yes 3) yes but it wont find it – cpherx Feb 06 '17 at 12:40
  • 1) If you can know the path of Uninstallation file ( I felt path might be common / Might you have stored in registry ) , you can run the file with wmic directly. 2) If you can able to see, I hope it should work ( try with listing installed applications using wmic command "wmic product get name" (specify remote details) ) 3) Can you tell us the wmic command used & the return value of the command ? – ban Feb 07 '17 at 06:06
  • "wmic product get name" YES that is my problem it doesnt appear doing that how can i make wmic see that program? – cpherx Feb 07 '17 at 18:29
  • Further to my comments, wmic will display only the software that is installed by Microsoft Installer( [refer](http://www.tech-archive.net/Archive/Windows/microsoft.public.windows.server.scripting/2005-05/msg00675.html) ). So Can I know the type of installer ? Did you tried using uninstall script ( by running it remotely )? – ban Feb 08 '17 at 06:51
  • i think i was clear in the question,what you are saying is not true because if i go on uninstall program from the control panel of windows i can uninstall it normally...as i said in the question wmic can only view program installed on HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall and not on HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall everything in the question should be clear please read it more carefully and you will understand everything!!!!!!!!!! – cpherx Feb 08 '17 at 17:21
  • And yes i have tried using msiexec.exe but doesn't work or scripts so that's why i was asking to set default on wmic this HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall like this i can simply do this "wmic product get name" and ecc to uninstall – cpherx Feb 08 '17 at 17:21
  • You can't see the program using wmic, unless the program is Windows Installer (MSI) package. Is the application you are trying to delete is MSI ? – ban Feb 09 '17 at 12:25

1 Answers1

0

Doing what you are asking for is documented under Requesting WMI Data on a 64-bit Platform:

C++ applications can use the IWbemContext interface with IWbemServices::ExecMethod to communicate the use of a nondefault provider to WMI.

IInspectable
  • 46,945
  • 8
  • 85
  • 181
  • thanks man for the help really appriciate it!!!can you give me a small example on the int main() to unistall a program located in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall in cpp using this? i am new in C++ so i really have no idea how to use it!! and thanks for the helpfull answer!! – cpherx Feb 06 '17 at 13:19