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?

StackOverflow https://stackoverflow.com/questions/19672936

Pregunta

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.

¿Fue útil?

Solución 2

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% )

Otros consejos

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top