[ansible-project] Re: win_Shell or win_command executing a variable taken from win_reg_stat

2017-12-17 Thread Jordan Borean
While you can use win_shell I find it is better to use win_command when it comes to running executables, this way you don't fall prey to the shell specific escaping, e.g. when using win_shell you usually have to do it like; - win_shell: &"C:\Program Files\someapp\app.exe" compared to - win_com

[ansible-project] Re: win_Shell or win_command executing a variable taken from win_reg_stat

2017-12-17 Thread 'J Hawkesworth' via Ansible Project
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 instal

[ansible-project] Re: win_Shell or win_command executing a variable taken from win_reg_stat

2017-12-13 Thread Gareth Stockdale
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

[ansible-project] Re: win_Shell or win_command executing a variable taken from win_reg_stat

2017-12-13 Thread Gareth Stockdale
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

[ansible-project] Re: win_Shell or win_command executing a variable taken from win_reg_stat

2017-12-13 Thread Gareth Stockdale
SO the problem I have now is if I try and add args eg win_shell: '"{{uninstall}}" /S _?="{{installloc}}"' It fails to run it with "unable to exec C:\Program.exe" - ie the single quote i had around the "{{uninstall}" previously have moved around the entire command, but it now has issue with whit

[ansible-project] Re: win_Shell or win_command executing a variable taken from win_reg_stat

2017-12-13 Thread Gareth Stockdale
OK so I go the basic command working with... win_command: '"{{ uninstall}}"' Now working on the extra arguments On Wednesday, December 13, 2017 at 9:32:14 AM UTC, Gareth Stockdale wrote: > > I have some vendor software where I am trying to uninstall (following > their procedure) by obtaining

[ansible-project] Re: win_Shell or win_command executing a variable taken from win_reg_stat

2017-12-13 Thread Jordan Borean
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