I am trying to use Jenkins to install a versioned msi on a target machine like this:
wmic /node:"[HOST]" /user:"[USER]" /password:"[PASS]" product call install true ,"", "\\[HOST]\D$\WebsitesDirectory\Product.*.msi"
The file name will contain the version number so I can’t hard-code this into the wmic command. But wmic doesn’t seem to be able to install a file using a wildcard and quietly fails to install when I run this command. It appears that it has to have the exact path and filename of the file to install it. Does anyone know a way of using wildcards within file names or perhaps a better workaround?
Another possibility is this – Is it possible to get the exact name of the file that Jenkins pulled in via the copy artifact plugin?
So apparently this is not a wmic issue but a windows cmd one. I found that this solves the problem: