Ansible's a pretty thin wrapper around the platform capabilities- 
installing/uninstalling software on Windows is tricky, as every installer 
is a special snowflake, and many assume that there's a user sitting there 
to answer dialogs.

That said, I know Sliverlight fully supports unattended install/uninstall- 
have a look at 
http://download.microsoft.com/download/7/8/d/78da8ec9-8801-42e5-89e5-3809386f1316/Silverlight%20Deployment%20Guide.doc

I suspect the switch you're looking for is "/qu" (silent uninstall).


On Tuesday, June 14, 2016 at 3:58:07 AM UTC-7, Trond Hindenes wrote:
>
> Disabling UAC will have no effect. Any session coming in thru WinRM is by 
> default elevated.
>
> As Jon writes, some packages are simply difficult/super-hard/impossible to 
> uninstall in an unattended way. 
>
> On Saturday, June 11, 2016 at 9:21:21 PM UTC+2, 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/0c213394-1d1d-4a89-86c3-d06a5706f5e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to