var f = @"C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\SearchUI.exe"; var f2 = @"C:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\SearchUI.exe.bak"; File.Move(f1, f2); 

Unhandled "System.UnauthorizedAccessException" type exception in mscorlib.dll

Additional information: Access denied by this path.

How to make elevation rights like for example in IObitUnlocker?

  • one
    maybe you need a banal request for elevation? Well, so that when you launch, the UAC window jumped - vitidev
  • And if it's not a secret, why do you need it? I can not imagine what could be this non-harmful use. - VladD
  • You first need to properly deal with the device permissions in Windows. Some things can not be done without "shamanism", even having administrative rights through native Windows interfaces, not to mention even .NET with all its specific limitations. And all these restrictions in order for the system to maintain performance regardless of the level of "ignorance" of the user. Yes, there is a special software, but the real need for it is extremely rare, more often it is a sign that you are doing something wrong or purposefully disrupting the operation of the system. - rdorn
  • VladD These processes are not needed and can not be disabled by regular means. Disabling services does not give anything. Processes remain. This process is from Cortana. - codename0082016

1 answer 1

Most likely you are trying to work with a file in a so-called protected directory. For example, Windows, Program Files and the like. In new operating systems Win7? Win8 and I suspect in Win10, you can't manage to do something with the files in these directories. Work with files in unprotected directories, such as my documents.

  • There is no difference that the renaming takes place on another unlocked system? Manually and with the help file.move failed. And IObitUnlocker coped with the renaming. - codename0082016