win_command

Dear All,

I am able to install notepad in the window server but unable to do it in specific directory like D:\npp.

  • name: install notepad plus plus playbook
    hosts: win
    gather_facts: no
    tasks:
  • name: fetch notepad-plus-plus installer
    win_command: C:\Users\Administrator\Downloads\npp.7.7.1.Installer.exe /S
    register: output
    arguments: “INSTALLDIR=C:/mk”-- It does not work so is there any option available so that I can install it in a specific directory ?

Thanks,
Manish

INSTALLDIR looks like just another argument for the executable so it just comes after your /S like;

`

  • win_command: C:\Users\Administrator\Downloads\npp.7.7.1.Installer.exe /S INSTALLDIR=C:/mk

`

Thanks

Jordan

I have modified it as suggested but same result and it is installing in default directory i.e c:\Users\programefiles86*.…

Keep /S also in the argument section

Keep /S also in the argument section.