All

Im wanting to query the certificates installed in the trusted rootCA on the local machine when running through a VBScript. Now this can be queried using the certutil.exe utility, however Im hoping that we can connect to and query the certs through VBScript ....

The reason I want to acheive this is that the client is wanting to ensure that only certified SOE machines are connecting to the network remotely and this will be part of the VPN Quarantine through 2003.

Any ideas on this one please ?

Cheers

Sean

Re: Enumerate installed Certificates through VB Script by Michael

Michael
Sun Jan 18 16:40:35 CST 2004

Sean wrote:
> All
>
> Im wanting to query the certificates installed in the trusted rootCA
> on the local machine when running through a VBScript. Now this can be
> queried using the certutil.exe utility, however Im hoping that we can
> connect to and query the certs through VBScript ....
>
> The reason I want to acheive this is that the client is wanting to
> ensure that only certified SOE machines are connecting to the network
> remotely and this will be part of the VPN Quarantine through 2003.
>
> Any ideas on this one please ?
>
> Cheers
>
> Sean


Download details: Platform SDK Redistributable: CAPICOM
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=860EE43A-A843-462F-ABB5-FF88EA5896F6

CAPICOM Reference (Security: Platform SDK)
http://msdn.microsoft.com/library/en-us/security/security/capicom_reference.asp


--
Michael Harris
Microsoft.MVP.Scripting

Windows 2000 Scripting Guide
Microsoft® Windows®2000 Scripting Guide
http://www.microsoft.com/technet/scriptcenter/scrguide/sagsas_overview.asp

TechNet Script Center Sample Scripts
http://www.microsoft.com/downloads/release.asp?ReleaseID=38942

WSH 5.6 documentation download
http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en


Re: Enumerate installed Certificates through VB Script by Torgeir

Torgeir
Sun Jan 18 16:49:05 CST 2004

Sean wrote:

> Im wanting to query the certificates installed in the trusted rootCA on the local machine when running through a VBScript. Now this can be queried using the certutil.exe utility, however Im hoping that we can connect to and query the certs through VBScript ....
>
> The reason I want to acheive this is that the client is wanting to ensure that only certified SOE machines are connecting to the network remotely and this will be part of the VPN Quarantine through 2003.
>
> Any ideas on this one please ?

Hi

You either need to use a command line utility or an activex object for this.

For the activex object part CAPICOM from Microsoft is an option (but a DLL needs to be installed on the computers to use it).

Introducing CAPICOM
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsecure/html/intcapicom.asp

See e.g. CAPICOM 2.0.0.3 sample Cstore.vbs for VBScript examples.

Maybe on of the functions/properties will help you do what you want to do:

http://msdn.microsoft.com/library/en-us/security/security/certificates.asp
http://msdn.microsoft.com/library/en-us/security/security/certificates_find.asp

http://msdn.microsoft.com/library/en-us/security/security/store.asp
http://msdn.microsoft.com/library/en-us/security/security/store_certificates.asp

http://msdn.microsoft.com/library/en-us/security/security/certenumcertificatesinstore.asp
http://msdn.microsoft.com/library/en-us/security/security/certfindcertificateinstore.asp


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scriptcenter