Gad
(Gad)
1
Hi
Im tryin to execute “c:\my files\a.bat”
which call : “c:\my files\c.bat”
i did try using the raw module like:
raw: “cd "c:\my-files" & "c:\my-files\a.bat"”
but ansible refuse to pipe the sign &
also tried with "&" but then error appears
how can i cd to a relevant directory and then execute file.bat??
win_command???
Can you just use the full path to the .bat file?
If you need to change the working directory, perhaps just modify the .bat file contents?
Hope this helps,
Jon
Can you just use the full path to the .bat file?
If you need to change the working directory, perhaps just modify the .bat file contents?
Hope this helps,
Jon
Gad
(Gad)
4
i wish
activate a bat file (windows) has to be from the directory itself.
i tried to cd with “&” and call the bat in one line
but ansible raw module does not allow to use & sign
בתאריך יום שישי, 20 בינואר 2017 בשעה 00:03:51 UTC+2, מאת J Hawkesworth:
Perhaps use a PowerShell script to cd and run the .bat file? You can use the script module to send and run the PowerShell script.
Hope this helps,
Jon