/build/static/layout/Breadcrumb_cap_w.png

Automatically install latest kace agent during k2 deployments

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?


0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Posted by: chucksteel 3 years ago
Red Belt
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. 
Posted by: five. 3 years ago
Second Degree Green Belt
0

Top Answer

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!

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ