2

We have an internal developed VSTO application as a Word Add-in and I need to deliver silently to a Windows 7 SOE. The domain is 2008 R2 based.

However, when I script the installer, it comes up with "unsigned" error and I have to manually accept it to install.

Is there a way to create a self signed certificate and package it with the application so the silent install will run without the prompt for the "unsigned" application, please?

4
  • 1
    Use OpenSSL to create a self-signed certificate then place that in your Certificate Store. The certifcate will have to be one every pc on the network for this to work.
    – Ramhound
    Jun 20, 2014 at 11:13
  • +! for asking on the correct site (rather than Stack Overflow). Also, this question does not appear to have been asked before. I'm not sure why you have been downvoted.
    – jww
    Jun 21, 2014 at 8:41
  • You need a Microsoft code signing certificate. You might need to create it with Microsoft Certificate Services snap-in or use a third party (I'm not sure if OpenSSL can create a Microsoft compatible code signing cert). Then, use a GPO to push the certificate to all machines in the domain.
    – jww
    Jun 21, 2014 at 8:46
  • What I am trying to achieve is a SOE package, where I install all the required apps (including the .VSTO app), then deliver as a VDI and also to some thick clients.
    – user334981
    Jun 22, 2014 at 4:19

1 Answer 1

0

First I would create a non expiring certificate.

Start | All Programs | Microsoft Visual Studio | Visual Studio Tools | Developer Command Prompt for VS201X | Right click and "Run as administrator"

screenshot

Then paste the following commands. You can update the certificate name to what you want.

Exclude the "-f" parameter on the  first run or the .pfx file won't get created.
MakeCert /n "CN=Anthony" /r /h 0 /eku "1.3.6.1.5.5.7.3.3,1.3.6.1.4.1.311.10.3.13" /e "01/16/2174" /sv Anthony.pvk Anthony.cer 
pvk2pfx -pvk Anthony.pvk -spc Anthony.cer -pfx Anthony.pfx –f
  • the date format is the US standard MM/DD/YYYY
  • the "-f" parameter is used for overwriting an existing file.

In the Visual Studio project properties, select "Signing" click on "Select from File…" Navigate to C:\Windows\System32 and select the certificate file (*.pfx)

To learn more about the used tools

Makecert

http://msdn.microsoft.com/en-us/library/bfsktky3%28v=vs.80%29.aspx

Pvk2Pfx

http://msdn.microsoft.com/en-us/library/windows/hardware/ff550672%28v=vs.85%29.aspx

References: https://bernhardelbl.wordpress.com/2012/03/20/create-a-non-expiring-test-certificate-pfx-for-clickonce-applications/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .