It's fairly easy using the New-SelfSignedCertificate command in Powershell. Open powershell and run these 3 commands.
1) Create certificate:
$cert = New-SelfSignedCertificate -DnsName www.test.com -Type CodeSigning -CertStoreLocation Cert:CurrentUserMy
2) set the password for it:
$CertPassword = ConvertTo-SecureString -String "you_password" -Force -AsPlainText
3) Export it:
Export-PfxCertificate -Cert "cert:CurrentUserMy$($cert.Thumbprint)" -FilePath "d:selfsigncert.pfx" -Password $CertPassword
Your certificate selfsigncert.pfx will be located @ D:/
签名工具可搜索:kSign