none
Windows 10 SDK gflags.exe RRS feed

  • Question

  • I need to use gflags.exe (Windows 10 SDK) to help find memory leaks for a project at work. When I try to run gflags.exe as an administrator, I get error "system registry gflags: error: 2". My colleagues and I are unsure of what error 2 is and are unable to find anything about it online. Any help with this issue would be greatly appreciated! 

    More info:

    Windows 10 Enterprise Edition, 64 bit

    Am running gflags.exe as administrator

    NOT receiving 'system registry gflags: error: 5' issue.

    gflags GUI still pops up (though, on my image tab that I need, everything is grayed out)

    Computer has been restarted since downloading/installing windows 10 SDK


    This is cross-posted on the TechNet and microsoft community forums.

    • Edited by rtb0012 Monday, March 18, 2019 8:02 PM
    Monday, March 18, 2019 6:13 PM

All replies

  • Hello rtb0012,

    >>>I get error "system registry gflags: error: 2".

    If this is a system error (ERROR_FILE_NOT_FOUND: 2 (0x2)) it means "The system cannot find the file specified."

    I can't reproduce this issue. Can you try the following methods to see if it works?

    1. Run gflags from command line. 

    • Open an CMD and navigate to the gflags tool path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64, then run it.

    2. Find the gflags.exe at path: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64. Right click and select "Run as administrator".

    Please let me know if it helps.

    Best regards,

    Rita


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Tuesday, March 19, 2019 7:44 AM
  • Thank you for your reply! Unfortunately, neither of these methods were able to rid me of the issue. However after trying to run glflags this morning, I was able to run it with *almost* no issues. I am no longer getting the error: 2 upon running gflags although I haven't changed anything. My issue now is when I go to the Image tab and insert my image name. After I press okay, I receive another pop-up window that is titled 'Unable to save Registry information' with the error 'image (image name) Error: 2', where (image name) is the name of my image. This may be a common issue, I'm not sure as I haven't had much time to research it yet. gflags is being ran as an administrator at this time, so I don't believe that to be an issue. 

    Thank you for your help and I appreciate any other information you may have!

    Tuesday, March 19, 2019 1:58 PM
  • Hello rtb0012,

    To check if your GFlags tool can work, can you follow these two tutorials and test?

    Example 10: Detecting a Heap Memory Leak in a Process

    Setting and Clearing Image File Flags

    If above tests can't reproduce this issue then this issue maybe related to your image. So can you provide more information of your image? Is it a win32 application?

    Best regards,

    Rita


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, March 20, 2019 6:16 AM