Is there a command-line command in Win7 to check the digital signature status of a .exe or .dll file?
Just like what you get in the file properties's Digital Signature tab, I want a command line to get this information. I don't need to sign the file, just check the signature status.
Thanks,
April 13th, 2011 11:34pm
cirodd,
Try this powershell one-liner:
(get-authenticodesignature c:\"program files"\ccleaner\ccleaner.exe).status -eq "valid"
I've used c:\program files\ccleaner\ccleaner.exe as the filepath
Free Windows Admin Tool Kit Click here and download it now
April 14th, 2011 1:22am
Now if I've aroused your interest in PowerShell, then
WIN | type Powershell | do NOT hit enter |
Windows PowerShell will give you a command-line interface
Windows GowerShell ISE will give you a graphical interfact to PowerShell.
Here are some links for you:
PowerShell
PowerShell Cookbook
Powershell Forum Windows PowerShell Core
Winows PowerShell Features
The "cookbook" isn't current but still a valid intro to PowerShell.
You don't need to understand all or be a wizard with powershell to use powershell.
April 14th, 2011 1:50am
It's very interesting, I've never used it before.
Also, I found powershell command can be run under DOS just as:
powershell -command (get-authenticodesignagture c:\'program files'\ccleaner\ccleaner.exe).status -eq 'valid'
The only thing to be noticed is all " should be replaced with ' in DOS.
Thanks Karl!
Free Windows Admin Tool Kit Click here and download it now
April 14th, 2011 3:34am
Glad to help and thanks for reminding me about the double to single quote.
On can also use %programfiles% if desired.
April 14th, 2011 2:49pm
Hi,
If you need and external tool, you can use signtool.exe. It is part of the Windows SDK, it takes command line arguments. For more information, you can refer to:
http://msdn.microsoft.com/en-us/library/aa387764.aspx
Best Regards,
NikiPlease remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
April 18th, 2011 5:43am