Try @echo off FOR /f "tokens=*" %%G IN ('dir /s *.dll *.ocx *.exe') DO ( echo %%G set A= "%%G" signtool sign /f "C:\Certificates\FakeCertificate.pfx" %A% )
How to recursively search all the ocx, dll and exes in a folder and subfolder then sign them all barring thie third party ones, using a batch file?
-
01-07-2022 - |
Domanda
I am using signtool to sign my msi.
How to recursively search all the ocx, dll and exes in a folder and subfolder then sign them all using a batch file? I want to sign only the ones developed by me and not the third party ones.
Soluzione 2
Altri suggerimenti
If you have set the file properties at compile time, you can get them via wmic. Try
wmic datafile where name='c:\\windows\\system32\\calc.exe' get Manufacturer
Use wmic datafile where name='P:\\ath\\to\\file'
to view all the available fields. Use wmic datafile get /?
to get help.
As foxidrive has commented, recursion is easy. Search stackoverflow or try for /r
batch command
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow