public void Execute(IActivityRequest request, IActivityResponse response) { SCCMServer = settings.SCCMSERVER; userName = settings.UserName; password = settings.Password; String pkgID = request.Inputs["Existing Package ID"].AsString(); String pkgSourceFilePath = request.Inputs["New Package Source Path"].AsString(); //Setup WQL Connection and WMI Management Scope WqlConnectionManager connection = CMInterop.connectSCCMServer(SCCMServer, userName, password); using (connection) { IResultObject col = CMInterop.configureSCCMPackageSourcePath(connection, pkgID, pkgSourceFilePath); if (col != null) { response.WithFiltering().PublishRange(getObjects(col)); } response.Publish("Number of Packages", ObjCount); } }