0xn1k5 / bulk_pdf_encryption_utility Goto Github PK
View Code? Open in Web Editor NEWPowershell Based utility to encrypt / password protect PDF files with unique password for each file
License: GNU General Public License v3.0
Powershell Based utility to encrypt / password protect PDF files with unique password for each file
License: GNU General Public License v3.0
Hi I cloned your repo and tried to run the script, it failed with the following error :
PS C:\src\Bulk_PDF_Encryption_Utility> C:\src\Bulk_PDF_Encryption_Utility\pdfEncrypt_v1.0.ps1
GAC Version Location
--- ------- --------
False v2.0.50727 C:\src\Bulk_PDF_Encryption_Utility\dll_library\itextsharp.dll
new-object : Retrieving the COM class factory for component with CLSID {00000000-0000-0000-0000-000000000000} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154
(REGDB_E_CLASSNOTREG)).
At C:\src\Bulk_PDF_Encryption_Utility\pdfEncrypt_v1.0.ps1:40 char:8
+ $excel=new-object -com excel.application
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [New-Object], COMException
+ FullyQualifiedErrorId : NoCOMClassIdentified,Microsoft.PowerShell.Commands.NewObjectCommand
The property 'DisplayAlerts' cannot be found on this object. Verify that the property exists and can be set.
At C:\src\Bulk_PDF_Encryption_Utility\pdfEncrypt_v1.0.ps1:41 char:1
+ $excel.DisplayAlerts = $false
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
The property 'Visible' cannot be found on this object. Verify that the property exists and can be set.
At C:\src\Bulk_PDF_Encryption_Utility\pdfEncrypt_v1.0.ps1:42 char:1
+ $excel.Visible = $false
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
You cannot call a method on a null-valued expression.
At C:\src\Bulk_PDF_Encryption_Utility\pdfEncrypt_v1.0.ps1:43 char:1
+ $workbook=$excel.workbooks.open($excelReferenceSheet)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At C:\src\Bulk_PDF_Encryption_Utility\pdfEncrypt_v1.0.ps1:44 char:1
+ $worksheet=$workbook.Sheets.Item($excelSheetNumber)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
RowCount: 0
ColumnCount 0
You cannot call a method on a null-valued expression.
At C:\src\Bulk_PDF_Encryption_Utility\pdfEncrypt_v1.0.ps1:95 char:1
+ $excel.Quit()
+ ~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Exception calling "ReleaseComObject" with "1" argument(s): "Object reference not set to an instance of an object."
At C:\src\Bulk_PDF_Encryption_Utility\pdfEncrypt_v1.0.ps1:99 char:1
+ [System.Runtime.Interopservices.Marshal]::ReleaseComObject($worksheet ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : NullReferenceException
Exception calling "ReleaseComObject" with "1" argument(s): "Object reference not set to an instance of an object."
At C:\src\Bulk_PDF_Encryption_Utility\pdfEncrypt_v1.0.ps1:100 char:1
+ [System.Runtime.Interopservices.Marshal]::ReleaseComObject($excel)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : NullReferenceException
Remove-Variable : Cannot find a variable with the name 'excel'.
At C:\src\Bulk_PDF_Encryption_Utility\pdfEncrypt_v1.0.ps1:102 char:1
+ Remove-Variable -Name excel
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (excel:String) [Remove-Variable], ItemNotFoundException
+ FullyQualifiedErrorId : VariableNotFound,Microsoft.PowerShell.Commands.RemoveVariableCommand
My system info is :
systeminfo
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.19044 N/A Build 19044
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 42 Stepping 7 GenuineIntel ~1600 Mhz
BIOS Version: American Megatrends Inc. 3603, 11/9/2012
Windows Directory: C:\WINDOWS
System Directory: C:\WINDOWS\system32
Hotfix(s): 12 Hotfix(s) Installed.
[01]: KB5017022
[02]: KB4562830
[03]: KB4570334
[04]: KB4577586
[05]: KB4580325
[06]: KB4586864
[07]: KB5003791
[08]: KB5012170
[09]: KB5017308
[10]: KB5014032
[11]: KB5015895
[12]: KB5016705
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.