使用 Redemption 时操作系统版本错误 800401FA

Wrong version of operating system when using Redemption 800401FA

我正在尝试 运行 将 .eml 消息导入 outlook 的简单脚本。我正在使用 Redemption 开发者版本。当我创建对象时出现问题。我收到 800401FA 错误,根据我的理解,该错误告诉我存在赎回-前景不匹配。我使用 2016 年 32 位 outlook,我同时注册了 Redemption.dll 和 Redemption64.dll

我使用的脚本:

'===================================================================
'Description: VBS script to import eml-files with Redemption.
'
'Comment: Before executing the vbs-file, make sure that the
'         Developer version of Redemption is installed.
'         http://dimastr.com/redemption/download.htm
'
' author : Robert Sparnaaij
' version: 1.1
' website: http://www.howto-outlook.com/howto/import-eml-files.htm
'===================================================================

Dim objShell : Set objShell = CreateObject("Shell.Application")
Dim objFolder : Set objFolder = objShell.BrowseForFolder(0, "Select the folder containing eml-files", 0)

Dim Item
Dim i : i = 0
If (NOT objFolder is nothing) Then
  Set WShell = CreateObject("WScript.Shell")
  Set objOutlook = CreateObject("Outlook.Application")
  Set Folder = objOutlook.Session.PickFolder
  If NOT Folder Is Nothing Then
    For Each Item in objFolder.Items
      If Right(Item.Name, 4) = ".eml" AND Item.IsFolder = False Then
        Set objPost = Folder.Items.Add(6)
        Set objSafePost = CreateObject("Redemption.SafePostItem")
        objSafePost.Item = objPost
        objSafePost.Import Item.Path, 1024
        objSafePost.MessageClass = "IPM.Note"
        ' remove IPM.Post icon
    Set utils = CreateObject("Redemption.MAPIUtils")
    PrIconIndex = &H10800003
        utils.HrSetOneProp objSafePost, PrIconIndex, 256, true 'Also saves the message
    i = i + 1
      End If
    Next

    MsgBox "Import completed." & vbNewLine & vbNewLine & "Imported eml-files: " & i & _
       vbNewLine & "Imported into: " & Folder.FolderPath, 64, "Import EML"

    Set Folder = Nothing
  Else
    MsgBox "Import canceled.", 64, "Import EML"
  End If
Else
  MsgBox "Import canceled.", 64, "Import EML"
End If

Set objFolder = Nothing
Set objShell = Nothing

知道问题出在哪里吗?

我注销了 64 位版本的 Redemption,只注册了 32 位,但现在显示 8007007E 错误消息。

对于遇到同样问题的每个人 - 注册正确版本的 dll 是不够的。对于 32 位 outlook,您还需要 运行 脚本不同的方式:

c:\Windows\SysWow64\cscript.exe <full path to your vbs file>