Windows 7 I can't run the command using batch file

Discussion in 'General Computing' started by CDWANG, Apr 25, 2016.

  1. CDWANG

    CDWANG New Member

    Joined:
    Apr 25, 2016
    Messages:
    5
    Likes Received:
    0
    Hi ,

    Can anyone advise on this.

    I was running a command as below using cmd batch file

    typeperf "\Processor(_Total)\% Processor Time" >> Memory.txt

    However, I could not display the output to the text file and it shows error :

    Error: No valid counters.


    Please kindly advice.

    Regards
    Wang
     
  2. CDWANG

    CDWANG New Member

    Joined:
    Apr 25, 2016
    Messages:
    5
    Likes Received:
    0
    Hi all,

    It shows this error when I open my notepad.


    "
    In order to use typeperf, you must either be a member of the local
    Performance Log Users group, or the command must be executed from an
    elevated command window."


    Can someone advice me what to do , tks :)


    Regards
    CD
     
  3. Neemobeer

    Neemobeer Windows Forum Team
    Staff Member

    Joined:
    Jul 4, 2015
    Messages:
    2,410
    Likes Received:
    363
    Run the batch file as an administrator. Right click it and select "Run as Administrator"
     
  4. CDWANG

    CDWANG New Member

    Joined:
    Apr 25, 2016
    Messages:
    5
    Likes Received:
    0
    Hi , Tks for your advice.

    I have done that but still the program does not run well.
     
  5. CDWANG

    CDWANG New Member

    Joined:
    Apr 25, 2016
    Messages:
    5
    Likes Received:
    0
    Hi The error message is as shown per attached file.
     

    Attached Files:

Share This Page

Loading...