2014-01-14 29 views
1

避免UAC虛擬我有一個通常安裝在 ℃的VB6遺留應用程序:/ Program Files文件/應用程序名稱在Win7 Win8的和

這意味着Win7的下和8是受UAC虛擬化的控制。由於一些用戶發現似乎沒有文件混淆,我想避免UAC虛擬化。如果我要安裝在其他目錄下的應用程序,如

C:/我的應用程序/ AppName的

這是分開的程序文件,這會避免UAC虛擬化或將它仍然發生?

謝謝

+2

更好地爲您的應用程序使用「ProgramData」文件夾,例如。 'C:\ ProgramData \ YourApplication \' –

+0

+1 Bhavesh。 [此問題中的更多解釋和代碼](http://stackoverflow.com/questions/4273424/where-should-i-store-application-specific-settings) – MarkJ

+0

[Prevent UAC Virtualization?](http:/ /stackoverflow.com/questions/3181157/prevent-uac-virtualization) – MarkJ

回答

2

你最好的解決辦法是在安裝應用程序:

%LOCALAPPDATA%\ClintonSoft 

例如

C:\Users\Clinton\AppData\Local\ClintonSoft 

這是允許用戶修改的文件夾。

或者,你可以關閉虛擬化

您可以選擇退出文件和註冊表虛擬化。您可以通過通過指示requestedExecutionLevel的asInvoker添加到您的程序集清單的項目做到這一點:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
    <assemblyIdentity 
      version="1.0.0.0" 
      processorArchitecture="X86" 
      name="client" 
      type="win32" 
    /> 

    <description>Clinton's Reilly Factor</description> 

    <!-- Disable file and registry virtualization --> 
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> 
     <security> 
      <requestedPrivileges> 
       <requestedExecutionLevel level="asInvoker"/> 
      </requestedPrivileges> 
     </security> 
    </trustInfo> 

</assembly> 

警告

通過選擇出的文件和註冊表虛擬化,您的應用程序將無法使用完全相同的ACCESS_DENIED錯誤你會在Windows XP上得到。