SignTool.exe verify /pa returns exit code 1 from the code but works fine while running from command prompt
hi,
i using signtool.exe new process() verify codesigned assembly , returns exit code 1 whereas returns exit code 0 while run same visual studio command prompt. please let me know thoughts...
here code snippet 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
hi mani,
you welcome.
it seems there wrong vb.net code.
please copy microsoft.it.security.ui.systemsecuritymanagement.ssmuiwebhost.dll file c:\\ folder, try run this vb.net code below:
process p = new process(); p.startinfo.filename = "c:\\program files (x86)\\microsoft sdks\\windows\\v7.0a\\bin\\signtool.exe"; string args = @"verify"; string name = "c:\\microsoft.it.security.ui.systemsecuritymanagement.ssmuiwebhost.dll"; p.startinfo.arguments = args + " " + "/pa " + "/v " + name; p.start(); p.waitforexit(); int pexitcode = p.exitcode; messagebox.show(pexitcode.tostring());
hope helps!
amy
Windows Server > Security
Comments
Post a Comment