/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


Automatically install latest kace agent during k2 deployments

11/30/2017 1299 views
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:
0 Comments   [ + ] Show comments

Comments


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.
Second Degree Green Belt

All 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

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
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