This is the line of code that is throwing the error:
Code:
$dMC = New-Object -ComObject dMCScripting.Converter
Here is the actual error from a PowerShell (x86) prompt:
New-Object : Retrieving the COM class factory for component with CLSID {1C2E0932-61B5-4EAB-A832-06EE6564047D} failed due to the following error: 800700c1.
At C:\PowerShell\SingleArtistAlbum-FileRename.ps1:5 char:18
+ $dMC = New-Object <<<< -ComObject dMCScripting.Converter
+ CategoryInfo : NotSpecified: (:) [New-Object], BadImageFormatException
+ FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShel l.Commands.NewObjectCommand
I receive the same error even if I include these lines in the script above the creation of the new COM object:
Code:
C:\Windows\System32\regsvr32.exe "C:\Program Files (x86)\Illustrate\dBpoweramp\dMCScripting.dll"
C:\Windows\SysWOW64\regsvr32.exe "C:\Program Files (x86)\Illustrate\dBpoweramp\dMCScripting.dll"
I get 2 message boxes saying that they registered successfully, but the script still fails.
When I implement this in the script:
Code:
C:\Windows\System32\regsvr32.exe /u "C:\Program Files (x86)\Illustrate\dBpoweramp\dMCScripting.dll"
C:\Windows\SysWOW64\regsvr32.exe "C:\Program Files (x86)\Illustrate\dBpoweramp\dMCScripting32.dll" *copied and renamed from WindowsXP installation
no error is returned, but no data is captured from the methods ReadIDTagElementValue and AudioProperties.