Click here to Skip to main content
15,881,844 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to make a form reference public? Pin
Christian Graus22-Oct-09 17:35
protectorChristian Graus22-Oct-09 17:35 
GeneralRe: how to make a form reference public? Pin
dan!sh 22-Oct-09 17:45
professional dan!sh 22-Oct-09 17:45 
QuestionHow to drag image from my picturebox to other application(ex.Photoshop) Pin
Kortez222322-Oct-09 7:57
Kortez222322-Oct-09 7:57 
AnswerRe: How to drag image from my picturebox to other application(ex.Photoshop) Pin
Christian Graus22-Oct-09 12:10
protectorChristian Graus22-Oct-09 12:10 
QuestionMouseMove event firing even though I'm not moving my mouse! Pin
WebMaster22-Oct-09 7:51
WebMaster22-Oct-09 7:51 
AnswerRe: MouseMove event firing even though I'm not moving my mouse! Pin
Eddy Vluggen22-Oct-09 8:29
professionalEddy Vluggen22-Oct-09 8:29 
GeneralRe: MouseMove event firing even though I'm not moving my mouse! Pin
WebMaster22-Oct-09 8:43
WebMaster22-Oct-09 8:43 
QuestionCAPICOM Process replacement Pin
Dave Kreskowiak22-Oct-09 7:49
mveDave Kreskowiak22-Oct-09 7:49 
I can't believe I'm doing this...

In my job, I have to digitally sign .MSI files before deployment. Previously, this was done using the CAPICOM 2.1 library and a manual wizard-based process to sign the .MSI.

Seeing an opportunity for process improvement, I scripted this process into a drag-and-drop operation where you just drop the .MSI file on the script and it would use the CAPICOM COM objects to find the appropriate code-signing certificate and sign the file for you, baking the signed hash into the file. When you went out to Explorer, you get the properties on the file and click the Digital Signatures tab, whaalaa, you can see the signature!

This process worked great under Windows XP...

Now, move to Windows 7 (we're skipping Vista! Smile | :) ). CAPICOM is no longer in the Windows SDK and is no longer supported as it is offically deprecated by MS. MS says that the same functionality CAPICOM provided can be cobbled together using managed code and the .NET Framework.

I've tried to get CAPICOM to work under Windows 7, but I haven't been able to get any of the COM objects to instantiate. So, now I'm trying to poke around the classes under the System.Security.Cryptography namespace and put together a process to digitally sign an .MSI file (or any other file for that matter,) but do it the with the signature in the file. Having a seperate signed hash in a p7s file does me no good. It must be baked into the .MSI just like the old CAPICOM process did it.

Anyone got any clues or research points to rebuilding this process in managed code? Which classes am I looking at?? I can see the the X509 certificates using the classes in the System.Security.Cryptography.X509Certificates namespace, but can't seem to piece together the signing process. What am I missing?


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008
But no longer in 2009...




Answer[SOLVED - Sort of...] CAPICOM Process replacement Pin
Dave Kreskowiak22-Oct-09 10:25
mveDave Kreskowiak22-Oct-09 10:25 
QuestionHow to copy a file? Pin
masoudshao22-Oct-09 7:22
masoudshao22-Oct-09 7:22 
AnswerRe: How to copy a file? Pin
Abhijit Jana22-Oct-09 7:31
professionalAbhijit Jana22-Oct-09 7:31 
GeneralRe: How to copy a file? Pin
Ashfield22-Oct-09 9:31
Ashfield22-Oct-09 9:31 
GeneralRe: How to copy a file? Pin
Abhijit Jana22-Oct-09 10:03
professionalAbhijit Jana22-Oct-09 10:03 
AnswerRe: How to copy a file? Pin
Abhishek Sur22-Oct-09 7:48
professionalAbhishek Sur22-Oct-09 7:48 
QuestionWhen to override Equals() ? Pin
Wes Jones22-Oct-09 6:20
Wes Jones22-Oct-09 6:20 
AnswerRe: When to override Equals() ? Pin
Henry Minute22-Oct-09 6:41
Henry Minute22-Oct-09 6:41 
AnswerRe: When to override Equals() ? Pin
DaveyM6922-Oct-09 6:47
professionalDaveyM6922-Oct-09 6:47 
Questioni need a help to convert class to byte [] array Pin
b.sahahf22-Oct-09 4:55
b.sahahf22-Oct-09 4:55 
AnswerRe: i need a help to convert class to byte [] array Pin
Eddy Vluggen22-Oct-09 5:01
professionalEddy Vluggen22-Oct-09 5:01 
GeneralRe: i need a help to convert class to byte [] array Pin
b.sahahf22-Oct-09 5:03
b.sahahf22-Oct-09 5:03 
GeneralRe: i need a help to convert class to byte [] array Pin
Eddy Vluggen22-Oct-09 5:15
professionalEddy Vluggen22-Oct-09 5:15 
GeneralRe: i need a help to convert class to byte [] array Pin
stancrm22-Oct-09 6:12
stancrm22-Oct-09 6:12 
QuestionDownloading PDF's from website Pin
Tom Wright22-Oct-09 4:16
Tom Wright22-Oct-09 4:16 
AnswerRe: Downloading PDF's from website Pin
Covean22-Oct-09 4:42
Covean22-Oct-09 4:42 
GeneralRe: Downloading PDF's from website Pin
Tom Wright22-Oct-09 4:49
Tom Wright22-Oct-09 4:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.