4. Sign your app

  1. Run Command Prompt as admin. (Press windows key, type “cmd”. Then right click and select “Run As Admin”.)

  2. Copy and paste the following command into your Command Prompt to change your directory.

     cd C:\Program Files (x86)\Windows Kits\8.1\bin\x64

    Cordova 24

  3. Run the following command to create .pvk and .cer files. Replace the publisherName parameter with your “CN=Company Name, O=Organization, C=Two Letter Country Code”. Replace the ExpirationDate parameter with an expiration date for your certificate in the mm/dd/yyyy format.
    MakeCert /n publisherName /r /h 0 /eku "1.3.6.1.5.5.7.3.3,1.3.6.1.4.1.311.10.3.13" /e 
    expirationDate /sv MyKey.pvk MyKey.cer

    Cordova 25

  4. You will be prompted to create a password for your .pvk file. Make sure to note this in a secure place. 


    Cordova 26
    Cordova 27

  5. Run the following command to convert your .pvk and .cer files into a .pfx file. Use your .pvk and .cer file names, as well as the password you created in the previous step.

    Pvk2Pfx /pvk pvkFileName.pvk /pi pvkPassword /spc cerFileName.cer /pfx pfxFileName.pfx

    Cordova 28

  6. Run the following command using your password and the name of the .pfx you generated.

    certutil -user -p pfxPassword -importPFX pfxFileName

    Cordova 30

  7. You will be prompted by a security warning asking if you’d like to install the certificate on your computer. Select “Yes”.Cordova 31

  8. For easier access you can move your .cer, .pfx and .pvk files from your Windows Kits folder(C:\Program Files (x86)\Windows Kits\8.1\bin\x64) to your app folder on your Desktop.

    Cordova 29

  9. Double click your .cer file to open. Under the “Details” tab select “Thumbprint” to view your certificates thumbprint.Cordova 32

  10. Open a new command prompt and change your directory to your app file. cordova p3

  11. Run the following command with your information.

    cordova build -- --packageCertificateKeyFile="PathTopfxFile"
    --packageThumbprint="YourPackageThumbprint"

    cordova p3 2
    cordova p3 3

    You now have a signed app you can submit to the Windows store.