Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4623926
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:03:28+00:00 2026-05-22T03:03:28+00:00

My code is running elevated but nothing can see/execute c:\windows\system32\rstrui.exe (System Restore Point UI).

  • 0

My code is running elevated but nothing can see/execute c:\windows\system32\rstrui.exe (System Restore Point UI).

I double checked to make sure the code really was running elevated (it is), and I’ve tested with File.Exist() and Directory.GetFiles() and System.Diagnostics.Process.Start(); file not found is what is returned.

The program is really there, I can really run it, I can copy/paste the path to DOS and list it, execute it (no hidden spaces, etc.).

Any ideas?

THE SOLUTION:

Tim (below) gave me the solution, instead of referencing c:\windows\system32 reference c:\windows\sysnative. The “sysnative” gets redirected, or, well, doesn’t. I’m still a bit confused about x64 redirection stuff. The point is, the following works:

Environment.GetEnvironmentVariable(“windir”) + @”\sysnative”

Thanks Tim!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T03:03:28+00:00Added an answer on May 22, 2026 at 3:03 am

    Let me guess… you’re running as an x86 application on a 64 bit installation of Windows?
    I’m not sure of the reason, but this thread provides some information.
    If you compile it for native 64 bit (or Any CPU I suppose) instead of x86, it’ll find the file properly.

    The reason for this is the System Folder Redirection that’s going on in 64bit OS’s on applications that are running under WOW64. You can read more about it here. One particularly relevant chunk of that post is talking about how to get around it:

    Applications can control the WOW64
    file system redirector using the
    Wow64DisableWow64FsRedirection,
    Wow64EnableWow64FsRedirection, and
    Wow64RevertWow64FsRedirection
    functions. Disabling file system
    redirection affects all file
    operations performed by the calling
    thread, so it should be disabled only
    when necessary for a single CreateFile
    call and re-enabled again immediately
    after the function returns. Disabling
    file system redirection for longer
    periods can prevent 32-bit
    applications from loading system DLLs,
    causing the applications to fail.

    32-bit applications can access the
    native system directory by
    substituting %windir%\Sysnative for
    %windir%\System32. WOW64 recognizes
    Sysnative as a special alias used to
    indicate that the file system should
    not redirect the access. This
    mechanism is flexible and easy to use,
    therefore, it is the recommended
    mechanism to bypass file system
    redirection. Note that 64-bit
    applications cannot use the Sysnative
    alias as it is a virtual directory not
    a real one.

    I was unable to get the %windir%\Sysnative idea working, but I’m hopeful that either that works for you or you can implement the enabling/disabling of redirection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am running an elevated UAC app. At one point in code, I want
Is there a tool that can generate sequence diagrams from running .NET code?
Following the directions at this question , I have some code running to extract
We get an abort when a C++ exception is thrown when running code compiled
I need to know how to turn on Code Coverage when running TFS builds
When running the following code it leaves out one row. When I do a
When running the below code a type is never returned, despite there being a
Running FxCop on my code, I get this warning: Microsoft.Maintainability : 'FooBar.ctor is coupled
When running the following Java code, I get very accurate and consistent results in
I am running following PHP code to interact with a MS Access database. $odbc_con

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.