windows - I am trying to make .jks file process automatic -
i have written script make .jks file automatic. having trouble how answer prompts in cmd. script:
keytool -genkey -keyalg rsa -alias selfsigned -keystore c:\keystore5.jks -storepass password -validity 360 -keysize 2048 - ahad paracha / - company / - ny / - ny / - / - yes
the prompts are:
enter keystore password: re-enter new password: first , last name? [unknown]: - ahad paracha / - company / - ny / - ny / - / - yes name of organizational unit? [unknown]: name of organization? [unknown]: name of city or locality? [unknown]: name of state or province? [unknown]: two-letter country code unit? [unknown]: cn=ahad paracha, ou=, o=, l=, st=, c= correct? [no]:
it wont answer other questions first one. writing cmd.
powershell can pass strings interactive prompts:
example:
'help', 'rescan' | diskpart
in case, try:
'ahad paracha', 'company', 'ny', 'ny', 'us', 'yes' | keytool -genkey -keyalg rsa -alias selfsigned -keystore c:\keystore5.jks -storepass password -validity 360 -keysize 2048
Comments
Post a Comment