Digital Certificate Install on other systems

User avatar
ErikJan
BronzeLounger
Posts: 1246
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Digital Certificate Install on other systems

Post by ErikJan »

Using a digital certificate (self sign) for code. When others 'install my certificate' they can set up their Excel to 'trust' me and the code in my tools will run without the 'macro-prompt". This always worked fine but I seem to have forgotten how someone else can install my certificate. The first parts are logical until I get here:
Capture5.png
I believe here I should choose manually (as the auto option doesn't work) but I'm stuck where to have the certificate installed "which store" (also 'personal' does not do the trick). I searched around but couldn't find this quickly. Anyone here who can help me out?
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78494
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Digital Certificate Install on other systems

Post by HansV »

Did you create the certificate using SelfCert.exe? If so, it will only be valid on your computer.
Best wishes,
Hans

User avatar
ErikJan
BronzeLounger
Posts: 1246
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: Digital Certificate Install on other systems

Post by ErikJan »

Yeas, I did that (and that works of course). I want other computers to work with that... worked fine always...

User avatar
HansV
Administrator
Posts: 78494
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Digital Certificate Install on other systems

Post by HansV »

Strange, I have never been able to trust a certificate created with SelfCert on another PC...
Best wishes,
Hans

User avatar
ErikJan
BronzeLounger
Posts: 1246
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: Digital Certificate Install on other systems

Post by ErikJan »

That worked here for years (for sure under 2003, I'm now beginning to wonder if it ever did under 2007). Trick was to:
1. "Show Signature Details"
2. "View Certificate"
3. "Install Certificate"
4. Place it in the right store (this is where I'm temporarily lost)

UPDATE - I found documented evidence that I did do this and the store in option 4 was the 'automatic'... I used this to with another party to have PC's setup to allow macros to run without prompt. This was done for years. But it was on XP and Office 2003... Either because this is Win7 and/or because of Office 2007 I can't get this back anymore...

Then next time Excel sees the certificate and asks if user should be trusted... select Yes, then no more prompts (ever) :-)
Last edited by ErikJan on 25 May 2012, 15:27, edited 1 time in total.

User avatar
HansV
Administrator
Posts: 78494
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Digital Certificate Install on other systems

Post by HansV »

Hopefully someone else will be able to help you with this.
Best wishes,
Hans

User avatar
StuartR
Administrator
Posts: 12609
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Digital Certificate Install on other systems

Post by StuartR »

Sorry, I have only ever used real certificates for this. I don't really know the restrictions on self-cert.

If the automatic setting doesn't work then I don't think specifying a specific certificate store will work either.
StuartR


User avatar
Jan Karel Pieterse
Microsoft MVP
Posts: 656
Joined: 24 Jan 2010, 17:51
Status: Microsoft MVP
Location: Weert, The Netherlands

Re: Digital Certificate Install on other systems

Post by Jan Karel Pieterse »

Can you "export" the certificate and then do some "run as administrator" trick to import it using IE?
Regards,

Jan Karel Pieterse
Excel MVP jkp-ads.com

User avatar
ErikJan
BronzeLounger
Posts: 1246
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: Digital Certificate Install on other systems

Post by ErikJan »

Sorry it took a while before I had the time to re-test this and indeed re-confirm that this did work before.

I've attached a file with annotated screen-captures indicating how (in Windows XP using Office 2003) I load an Excel-file with a Self-sign VBA certificate (not(!) created on this system).
The system indicated it sees code I then show the 8 steps to install the certificate. Upon re-load the sheet, now there's the option to "Always trust macros from this publisher" which all allow the sheet to open in future cases without prompts and with macros enabled (if the right setting is enabled in Excel of course).

My problem is that I'd like this to happen in Win7 / Office 2007/2010 and I can't (yet). Not sure if this is Windows or Office (yet)...

UPDATE - The mentioned attachement was added to the post
You do not have the required permissions to view the files attached to this post.
Last edited by ErikJan on 04 Jun 2012, 06:36, edited 1 time in total.

User avatar
Jan Karel Pieterse
Microsoft MVP
Posts: 656
Joined: 24 Jan 2010, 17:51
Status: Microsoft MVP
Location: Weert, The Netherlands

Re: Digital Certificate Install on other systems

Post by Jan Karel Pieterse »

Can you perhaps attach a tiny workbook with a signed macro so we can test it for ourselves?
Regards,

Jan Karel Pieterse
Excel MVP jkp-ads.com

User avatar
ErikJan
BronzeLounger
Posts: 1246
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: Digital Certificate Install on other systems

Post by ErikJan »

I can do that; will try to create something later this week.

Hope the PDF I attached is already clarifying (I tried to make it as clear as I could)

User avatar
Jan Karel Pieterse
Microsoft MVP
Posts: 656
Joined: 24 Jan 2010, 17:51
Status: Microsoft MVP
Location: Weert, The Netherlands

Re: Digital Certificate Install on other systems

Post by Jan Karel Pieterse »

I had no problem accessing the dialog, see attached.
You do not have the required permissions to view the files attached to this post.
Regards,

Jan Karel Pieterse
Excel MVP jkp-ads.com

User avatar
ErikJan
BronzeLounger
Posts: 1246
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: Digital Certificate Install on other systems

Post by ErikJan »

OK, I see that but now if you re-open the document, is there a difference and can you now 'always trust' so that the next time after that the macro prompt is no longer there...???

User avatar
Jan Karel Pieterse
Microsoft MVP
Posts: 656
Joined: 24 Jan 2010, 17:51
Status: Microsoft MVP
Location: Weert, The Netherlands

Re: Digital Certificate Install on other systems

Post by Jan Karel Pieterse »

I did not try that, as I didn't want to add that test cert to my certificate store.
Regards,

Jan Karel Pieterse
Excel MVP jkp-ads.com

User avatar
ErikJan
BronzeLounger
Posts: 1246
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: Digital Certificate Install on other systems

Post by ErikJan »

OK, but if you know where it is you can manually delete it after your tests, right? I show in my PDF where I found them back in the certificate store on my PC

User avatar
Jan Karel Pieterse
Microsoft MVP
Posts: 656
Joined: 24 Jan 2010, 17:51
Status: Microsoft MVP
Location: Weert, The Netherlands

Re: Digital Certificate Install on other systems

Post by Jan Karel Pieterse »

YOu can, but you have to make sure you install the cert in the trusted root store, see attached.
You do not have the required permissions to view the files attached to this post.
Regards,

Jan Karel Pieterse
Excel MVP jkp-ads.com

User avatar
Jan Karel Pieterse
Microsoft MVP
Posts: 656
Joined: 24 Jan 2010, 17:51
Status: Microsoft MVP
Location: Weert, The Netherlands

Re: Digital Certificate Install on other systems

Post by Jan Karel Pieterse »

Perhaps the trusted publishers store also works, up to you to try!
Regards,

Jan Karel Pieterse
Excel MVP jkp-ads.com

User avatar
ErikJan
BronzeLounger
Posts: 1246
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: Digital Certificate Install on other systems

Post by ErikJan »

I tried most of the stores I think and nothing seemed to work, I'll give it a more 'structured' try and will let you know.

User avatar
Jan Karel Pieterse
Microsoft MVP
Posts: 656
Joined: 24 Jan 2010, 17:51
Status: Microsoft MVP
Location: Weert, The Netherlands

Re: Digital Certificate Install on other systems

Post by Jan Karel Pieterse »

Perhaps you need to run Excel as admin?
Regards,

Jan Karel Pieterse
Excel MVP jkp-ads.com

User avatar
ErikJan
BronzeLounger
Posts: 1246
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: Digital Certificate Install on other systems

Post by ErikJan »

I don't know what I did wrong initially and/or did different this time but now things do appear to work at least on my system. I'll do some more tests and will then create a similar PDF document as before to describe the steps to do this.

(by the way... I did not even need to open Excel as admin)

Attachment added by HansV at Erik Jan's request:
SelfSign in Win7 Off2007 and 2010.pdf
You do not have the required permissions to view the files attached to this post.