WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

WMI
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Install MSI apps

 Keywords: installing install launch .msi msiexec msiexec.exe 

Question:

Anyone know how I can install 3 apps one after the other using Winbatch?.. The only catch is that it needs to run *.MSI apps?

Answer:

When installing msi packages, a process named msiexec.exe does all the processing. One way is to do a RunWait with msiexec.exe. Go to Microsoft's tech article #Q227091 to learn how to use msiexec.exe.


For remote installing use WMI.
computer = "Test"
userid = "fred"
pswd =  "flintstone"
msi = "update.msi"
Locator = objectopen("WbemScripting.SWbemLocator")
service = Locator.ConnectServer(computer, "root/cimv2", userid, pswd) 
Security = Service.Security_ 
Security.ImpersonationLevel = 3 
system = service.get("Win32_Process") 
start = system.create(StrCat("msiexec /i ",msi))
ObjectClose(Locator)
ObjectClose(Security)
ObjectClose(system)
--
Article ID:   W15785
File Created: 2003:05:13:11:30:06
Last Updated: 2003:05:13:11:30:06