You can pass win_shell a chdir in the 'args' section as well if that helps (may not if a full path is needed).
Feel free to go back to your vendor and ask them how their automated testing works if its such a pain to install/uninstall their product. The only way we will get better quality installers is if vendors get badgered into making them. cheers, Jon On Wednesday, December 13, 2017 at 11:37:00 AM UTC, Gareth Stockdale wrote: > > Appears the vendor is not storing productID in the expected path :( > > ON a different tact to avoid the extra single quoting on the executable, I > tried obtaining the windows short path for the file. win_stat does not > provide it. So I ran a successful win_shell cmd as follows: > > win_shell: cmd /c for %A in (\"{{ uninstall }}\") do @echo %~sA > args: > executable: cmd > > ...however in the stdout it is not returning the shorthand version like > when I do it manually on a dos prompt :( > > On Wednesday, December 13, 2017 at 10:32:57 AM UTC, Gareth Stockdale wrote: >> >> HI Jordan, >> >> Example uninstall path: >> >> C:\Program Files (x86)\My Software\It Is Mine\myagent\uninstall.exe >> >> The full command woudl be... >> >> C:\Program Files (x86)\My Software\It Is Mine\myagent\uninstall.exe /S >> _?=C:\Program Files (x86)\My Software\It Is Mine\myagent >> >> I will take a look at win_package but initial reading suggest I also need >> to find the product ID associated, so will look into that. >> >> Thanks >> Gareth >> >> On Wednesday, December 13, 2017 at 9:47:45 AM UTC, Jordan Borean wrote: >>> >>> We would probably need some more information and not just a blank >>> variable called uninstall. You can omit names but keep the structure and >>> arguments the same so we can see what exactly is the value from the >>> registry key. Are you also able to share the registry path you are querying >>> as you might be able to use win_package for this instead. >>> >>> Thanks >>> >>> Jordan >>> >> -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2564f71b-8506-48e2-a4cb-b43e8e65dec8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.