none
How to install performance counter when the path to .exe changed? RRS feed

  • Question

  • I am very new to performance counter.

    I create a performance counter provider manifest file and add it to my MFC project.

    In the manifest file, I point out the path to my .exe file of my MFC project like this:

    applicationIdentity="C:\Users\Public\Documents\test\test.exe" 

    Then I compile it and get the .rc,.h,.cpp file and compile them with my MFC .cpp file, then get the test.exe file.

    Then I use <g class="gr_ gr_294 gr-alert gr_spell gr_run_anim gr_inline_cards ContextualSpelling ins-del multiReplace" data-gr-id="294" id="294">lodctr</g> to install performance counter manifest: <g class="gr_ gr_352 gr-alert gr_spell gr_run_anim gr_inline_cards ContextualSpelling ins-del multiReplace" data-gr-id="352" id="352">lodctr</g> /m:testCounter.man, it works.

    However, I need to install my .exe file as a windows service. After being installed, the .exe file will exist in C:\Program Files\myTest\test.exe. 

    But if I change applicationIdentity in manifest to 

    applicationIdentity="C:\Program Files\myTest\test.exe" and compile it and install it by <g class="gr_ gr_674 gr-alert gr_spell gr_run_anim gr_inline_cards ContextualSpelling ins-del multiReplace" data-gr-id="674" id="674">lodctr</g> again, it doesn't work.

    I google that, it seems that performance counter manifest file must be in the same project with .exe file, and the value of `applicationIdentity` must be the path of <g class="gr_ gr_647 gr-alert gr_gramm gr_run_anim gr_inline_cards Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="647" id="647">.exe</g> file in the same project. 

    What should I do if I want to install the performance counter after the path of the .exe file is changed after being installed?

    Thursday, February 23, 2017 9:29 PM