Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does my application allow me to save files to the Windows and System32 folders in Vista?
    primarykey
    data
    text
    <p>I have an application written in Delphi 7 which does not require an admin privilages to run. </p> <p>For some reason I am able to save files to c:\windows and c:\windows\system32 from within the application even though the application <b>has not requested UAC elevation</b>. I am logged in as an admin with <b>UAC turned on</b> and I haven't changed any of the default UAC settings. The files actually show up under Windows Explorer as well. I am not using the 'Run as Administrator' option.</p> <p>If I try to do the same thing using WordPad under the same profile I get an error as expected.</p> <p>Any ideas what is going on?</p> <p>Th application is using Ole Structured Storage to save and includes the following manifest, if that helps.</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt; &lt;assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"&gt; &lt;assemblyIdentity type="win32" name="DelphiApplication" version="1.0.0.0" processorArchitecture="*"/&gt; &lt;dependency&gt; &lt;dependentAssembly&gt; &lt;assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="*"/&gt; &lt;/dependentAssembly&gt; &lt;/dependency&gt; &lt;trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"&gt; &lt;security&gt; &lt;requestedPrivileges&gt; &lt;requestedExecutionLevel level="asInvoker" uiAccess="false"/&gt; &lt;/requestedPrivileges&gt; &lt;/security&gt; &lt;/trustInfo&gt; &lt;/assembly&gt; </code></pre> <p>Edit: To be clear my application does not save anything to these locations by default. I am choosing these locations via the standard file save dialog. </p> <p><strong>Update</strong></p> <p>I have found out why my application was being treated as legacy despite including the above manifest. It turns out a 2nd manifest was also being included which did not have the 'trustInfo' section. I have removed this 2nd manifest and all is well now.</p> <p>Thanks for all the help</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload