Quantcast
Channel: Security forum
Viewing all articles
Browse latest Browse all 12072

SignTool.exe verify /pa returns exit code 1 from the code but works fine while running from command prompt

$
0
0
Hi,
I am using SignTool.exe from a new Process() to verify a codesigned assembly and it returns the exit code 1 whereas it returns exit code 0 while i run the same from Visual Studio Command prompt. Please let me know your thoughts...

Here is my code snippet from VS2012 ultimate on Win7 PC.

p = new Process();

            p.StartInfo.FileName = "C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Bin\\SignTool.exe";
            string args = @"verify";
            p.StartInfo.Arguments =  args + " "+ "/pa " + "/v "+ name;
            p.Start();
            p.WaitForExit();
            pexitcode = p.ExitCode;
//name = "C:\\Users\\v-maparn\\Documents\\Visual Studio 2012\\Projects\\CodesignVerification\\CodesignVerification\\bin\\Release\\Microsoft.IT.Core.dll"

Thanks,

Mani

Viewing all articles
Browse latest Browse all 12072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>