Hi, Although I've not tried uninstalling silverlight, I've certainly found some other things to be as difficult to uninstall as you seem to be above. A lot of installers seem to have the assumption that there will be someone sitting there at a GUI answering questions. I wound up using a brute force script to remove a particular version of java a little while back - the uninstallation just refused to work in a fully unattended manner (something that seems to have been fixed with the java 8 versions I've hit so far).
Generally though, unless its something very simple, newer stuff seems to be better at being installed and uninstalled in a fully unattended manner. Its definitely worth poking suppliers about this too - fully automated install and uninstall is good for them to as they can automate their testing better after all. You asked about interactive services. I may have explained better during my talk - the audio is available here - https://www.ansible.com/ansible-2-windows - however the short version is long ago it was perfectly possible to write windows services which also interacted with the user via the system tray and by display forms. Such interactive services ran on the first gui session that was started, known as the console session but this caused security vulnerabilities. Its probably much better explained here: https://en.wikipedia.org/wiki/Shatter_attack - but more recent versions of windows have isolated the session which services run in from the sessions that ordinary interactive users log into, hence the need for Interactive Service Detection and the need to switch between the console session and user session so you can see the GUI of interactive services. The most recent versions of windows default to not allowing Interactive Services (presumably the thinking is that enough time has passed now for apps to have been re-written so that the GUI components exist in a separate user space program which communicates with the service via the service message api). Jon On Saturday, June 11, 2016 at 8:21:21 PM UTC+1, Bob Tanner wrote: > > Uninstalling Windows packages via Ansible is hard. Is this normal? I > feeling like I'm missing something fundamental using Ansible to manage > Windows. > > Here's my playbook. > > - name: disable UAC pop up for Administrators > win_regedit: > key: HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System > value: ConsentPromptBehaviorAdmin > data: 00000000 > datatype: dword > > - name: remove packages (win_package) > win_package: > > name="Microsoft Silverlight" > path="C:\\Program Files\\Microsoft Silverlight\\sllauncher.exe" > product_id="{89F4137D-6C26-4A84-BDB8-2E5A4BB71E00}" > state="absent" > > The task hangs and eventually timeout. Started to get desperate and added > these plays: > > - name: disallow interactive services > win_regedit: > key: HKLM:\SYSTEM\CurrentControlSet\Control\Windows > value: NoInteractiveServices > data: 00000001 > datatype: dword > > - name: stop Interactive Services Detection > win_service: > name: 'UI0Detect' > start_mode: manual > state: stopped > > Still the uninstall hangs and times out. > > When I try uninstalling Silverlight via: > > msiexec /uninstall "{89F4137D-6C26-4A84-BDB8-2E5A4BB71E00}" /l > C:\logs\zzz.log > > I get the "Windows Installer" dialog prompting to confirm the uninstall. > Click "Yes" and Silverlight is uninstalled. Nothing of much value in the > C:\logs\zzz.log file. > > msiexec /uninstall "{89F4137D-6C26-4A84-BDB8-2E5A4BB71E00}" /l > C:\logs\zzz.log \quiet > > Uninstalls without any dialog. Nothing of much value in the logs. > > How do I duplicate this uninstall with win_package? > > I cannot seem to get win_msi to work either. > > I am brute forcing things with script :-( > > - name: remove packages (powershell script) > script: files/remove-package.ps1 > > remote-package.ps1 > > $app = Get-WmiObject -Class Win32_Product -Filter "IdentifyingNumber = > '{89F4137D-6C26-4A84-BDB8-2E5A4BB71E00}'" > $app.Uninstall() > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/cf554a88-b970-4d9d-b322-eb828f1d9a0d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
