NCryptoki

 

Can not open registerInGAC.bat

6/19/2017 4:46:27 PM
kkc
Gravatar
Total Posts 13

Can not open registerInGAC.bat

Hi,

I just got the license of NCryptoki, and I try to register dll, but I can't open the bat file.

I am using VB to write the code. Is there any example of process to register? or any example code with VB to register.

Thank you very much.

6/19/2017 5:19:57 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: Can not open registerInGAC.bat

Are you using VB 6 or VB.NET?

6/19/2017 6:15:13 PM
kkc
Gravatar
Total Posts 13

Re: Can not open registerInGAC.bat

Hi, I use VB.NET

6/19/2017 7:09:27 PM
kkc
Gravatar
Total Posts 13

Re: Can not open registerInGAC.bat

And I have another question. I test the example code, my CKU_USER and CKU_SO pin is "1111", When I use CKU_USER and enter 1111, its not working. but if I change it to CKU_SO, there is no commend send to PINpad, it's not working when I use CKU_SO.

6/21/2017 12:54:46 PM
Gravatar
Total Posts 300
Ugo Chirico http://www.ugochirico.com

Re: Can not open registerInGAC.bat

mygacutil.exe we are supplying in the package is for 32bit (a bit old), this is why it is not working.

Forget mygacutil and register the dll using the standard way:

gacutil /i ncryptoki.dll

Then, issue related to the PIN depends on the undelying PKCS#11 dll. If your device has a pinpad it expects the PIN as null or empty string. read the documentation of your PKCS#11 dll

6/21/2017 3:26:17 PM
kkc
Gravatar
Total Posts 13

Re: Can not open registerInGAC.bat

Thank you Ugo.

6/21/2017 3:35:49 PM
kkc
Gravatar
Total Posts 13

Re: Can not open registerInGAC.bat

Should it be mygacutil /i Ncryptoki.dll or gacutil /i ncryptoki.dll? When I type It  in command prompt, it said "gacutil" is not recognized. I change it to mygacutil and there is no error shows up anymore. Did it mean register successfully?

6/21/2017 4:47:33 PM
kkc
Gravatar
Total Posts 13

Re: Can not open registerInGAC.bat

For " gacutil /i ncryptoki.dll" is not working and get the error like"gacutil.exe is not recognized as an internal or external command", I found solution might help:

https://social.technet.microsoft.com/wiki/contents/articles/22618.how-to-install-a-dll-to-the-gac-on-windows-server-2012-using-only-powershell.aspx

Set-location "c:\temp"

[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")

$publish = New-Object System.EnterpriseServices.Internal.Publish

$publish.GacInstall("c:\temp\MyDLL.dll")

iisreset

http://ncryptoki.com/Forums/Thread.aspx?pageid=9&t=314~1