2

I'm trying to run the MSDN's sample about WCF basic message security using Certificate. In the setup.bat file, there is this line of command:

certmgr.exe -add -r LocalMachine -s My -c -n %SERVER_NAME% -r CurrentUser -s TrustedPeople

When running the setup.bat, it works expectedly but I would like to try each command line manually, the %SERVER_NAME% should be replaced with localhost, so I tried this directly:

certmgr.exe -add -r LocalMachine -s My -c -n localhost -r CurrentUser -s TrustedPeople

However instead of executing the command and showing the result message usually known as Succeeded, the GUI version of certmgr is shown and does nothing. I expect that the command runs normally as when setup.bat is executed (the message Succeeded is printed and no GUI is shown).

So what am I actually doing wrong? I also don't know how to perform the above command using GUI instead.

Thank you, also if this is not the right place to ask this question, please some mod here moves it to the right place on stackexchange network. Please don't close it. Thank you!

Hopeless
  • 263
  • 1
  • 6
  • 15
  • 1
    **certmgr.msc** or **certmgr.exe** ? – clhy Nov 07 '15 at 03:01
  • well may be I just typed it `certmgr` without any extension. – Hopeless Nov 07 '15 at 03:02
  • I've found why it's like so. In fact what I did before was via the `CMD` which does not recognize the `certmgr.exe`, but when typing just `certmgr` the `certmgr.msc` might be invoked instead. However in `Visual Studio Command Prompt` we can just type `certmgr` or `certmgr.exe` - both are fine. Thank you @The_IT_Guy_You_Don't_Like – Hopeless Nov 07 '15 at 03:05
  • there is no certmgr.exe in windows so better try avoid it – clhy Nov 07 '15 at 03:09
  • @The_IT_Guy_You_Don't_Like yes, but it's packed with Visual Studio tools, it's quite a different thing from `certmgr.msc` which is present in Windows. – Hopeless Nov 07 '15 at 03:15

0 Answers0