I'm working on a WMIC uninstaller. A quite simple one with a button to display product names in a editable list (for copy/paste purposes) but the main problem is that in order to achieve this, in my corporation, normal users cannot uninstall softs.
What I found/adapt so far:
$Form1 = GUICreate("wmic uninstaller", 300, 152, 337, 380)
$Label1 = GUICtrlCreateLabel("Computername", 0, 8, 75, 17)
$Input1 = GUICtrlCreateInput(@ComputerName, 0, 32, 125, 21)
$Label2 = GUICtrlCreateLabel("wmic command", 150, 8, 77, 17)
$Combo1 = GUICtrlCreateCombo("Model_Computer", 150, 32, 125, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
$Button1 = GUICtrlCreateButton("List Apps", 150, 72, 91, 49)
$nMsg = GUIGetMsg()
$wmi = GUICtrlRead($combo1)
$pc = GUICtrlRead($input1)
RunWait(@ComSpec & ' /c ' & 'wmic /node:' & $pc &' product get name > %temp%\apps.txt' ,"", @SW_HIDE)
$file=(@TempDir & "/apps.txt")
MsgBox(0, $pc , $fileread)
FileDelete(@TempDir & "/apps.txt")
Here's the textual version I gave to my techs:
Create cmd shortcut on Desktop, run it as a different user (using their own admin accounts).
Once opened, type wmic
Once wmic loaded, type product get name
Wait for the list of installed soft to display
Type product where name="Exact App name" call uninstall
Type "Y" to confirm
Wait for task execution
Don't care about exit code
App is uninstalled (verified by getting the list again)!
In fact, I'd like to automatize this process.
Any ideas over here?