I am trying to add a PO task that will install the latest version automatically, without having to modify the PO task every time an agent upgrade happens and can't figure out the correct wildcard syntax. Should be simple, but I am striking out.

A few that I tried:
msiexec /i "\\k1host\client\agent_provisioning\windows_platform\ampagent-*.*.***-x86.msi" HOST=k1host
msiexec /i "\\k1host\client\agent_provisioning\windows_platform\ampagent-*-x86.msi" HOST=k1host
msiexec /i "\\k1host\client\agent_provisioning\windows_platform\*.msi" HOST=k1host

However when I added the version info explicitly like this it worked:

msiexec /i "\\k1host\client\agent_provisioning\windows_platform\ampagent-8.0.152-x86.msi" HOST=k1host

Any ideas?

Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answer Chosen by the Author

0
Using chucks answer as a guideline, I cobbled this batch file together and it works well:
for %%f in (\\k1host\client\agent_provisioning\windows_platform\*.msi) do (
msiexec /qb /i "\\k1host\client\agent_provisioning\windows_platform\%%~nf.msi" HOST=k1host
)
exit

Thanks Chuck!

Answered 12/04/2017 by: five.
Orange Senior Belt

Please log in to comment

Answers

2
The msiexec command doesn't accept wildcards. You could use the for command to identify the msi file in the folder and run the msiexec command on that file. 
Answered 12/01/2017 by: chucksteel
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity