Installing an .MSI on A Remote System Using VBscript

The following is from Microsoft's "System Administration Scripting Guide". Note that Active Directory is needed for this VB script to work.


Installs a hypothetical software program (using a Windows Installer package) on a remote computer. Requires delegation for the computer and user accounts involved in the procedure.

Script Code


Const wbemImpersonationLevelDelegate = 4

Set objWbemLocator = CreateObject("WbemScripting.SWbemLocator")

Set objConnection = objwbemLocator.ConnectServer _

("WebServer", "root\cimv2", "fabrikam\administrator", _

"password", , "kerberos:WebServer")

objConnection.Security_.ImpersonationLevel = wbemImpersonationLevelDelegate

Set objSoftware = objConnection.Get("Win32_Product")

errReturn = objSoftware.Install("\\atl-dc-02\scripts\1561_lab.msi",,True)

Wscript.Echo errReturn


The System Administration Scripting Guide, part of the Windows .NET Server Resource Kit. For more information, contact scripter@microsoft.com.


This post is locked
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