strUser = "" strPassword = "" strMSI = "" strComputer = "" 'Get user name, cannot be blank Do While strUser = "" strUser = InputBox("Enter user name", "User Name") Loop 'Get password, cannot be blank Do While strPassword = "" strPassword = InputBox("Enter password", "Password") Loop 'Get msi package path, cannot be blank Do While strMSI = "" strMSI = InputBox("Enter the path to the msi package", "MSI package") Loop 'Get destination computer, cannot be blank Do While strComputer = "" strComputer = InputBox("Enter the destination computer name", "Computer") Loop Const wbemImpersonationLevelDelegate = 4 Set objWbemLocator = CreateObject("WbemScripting.SWbemLocator") Set objConnection = objwbemLocator.ConnectServer _ (strComputer, "root\cimv2", strUser, strPassword) objConnection.Security_.ImpersonationLevel = wbemImpersonationLevelDelegate Set objSoftware = objConnection.Get("Win32_Product") errReturn = objSoftware.Install(strMSI,,True)
but it show the following error on command prompt SWbemLocator: The RPC server is unvalable. pls help me what is the problem in my script
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)