SignTool Error: CoCreateInstance returned error: 0x80040150

S

steveo.uts

I've created a web app in C # that creates a self-extracting
installation file, and then attempts to digitally sign that file using
MS signtool.

I'm using the Process class to invoke signtool and it is returning this
error:

SignTool Error: CoCreateInstance returned error: 0x80040150
Could not read key from registry

This runs fine from the VS 2005 integrated debugger on my machine, and
fine from the command line on the target machine. The target machine
is running Win 2003 with IIS 6.0

I've tried several solutions, none of which seem to make a difference,
including using impersonation of an account with admin rights on the
target system. I've used procmon to try to isolate which registry key
is the culprit, but didn't find any access denied entries. This feels
like a permissions issue, but I'm not sure where to look.

Does anyone know how to work around this problem? Thanks.
 
S

steveo.uts

The problem turned out to be that when signtool is called using
Process.Start() it does not possess sufficient rights to complete
successfully, even when impersonation is used at the application level.

For anyone that is interested, the process for solving this problem can
be derived from http://support.microsoft.com/Default.aspx?id=889251.
Thankfully, we have Microsoft Developer Support and the rep assigned to
my case pointed me towards this solution after only 1 or 2 email
exchanges.

The example from the link is for creating a web app that will call
whatever process you enter into an edit box, but you can incorporate
the code from steps 3, 5 and 11 into a work around for an existing web
app. The code from step 11 can be conveniently adapted into a method
that accepts the process + parameters as a single string, and then
passed on to CreateProcessAsUser.

SteveO
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top