I'm logged into my computer as admin, however, I don't think my program is running at that level because it fails to open a file c:\test.txt.
I think the problem is that my program is run from an NSIS installer, which uses ExecWait to run it. I think this causes my program to have less than admin privileges. Is there a way to request admin privileges?
Can I get admin privileges?
Re: Can I get admin privileges?
You're talking about Vista right?ninja9578 wrote:...
Is there a way to request admin privileges?
Yes, you can annoy the user with a box every time! ^_^'
Add a 'vista.manifest' file to your app's *.rc
like so: 1 24 "vista.manifest"
and in the manifest xml file add:
Code: Select all
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
vista 64bit, OS X 10.4.x, OS X 10.3.9 x 2
(virtualization: vista 32bit, MS XP, MS95, MS98, Debian 3.1, Slackware 12, FreeBSD 6.1, a few more)
wx: 2.8.8/9 (unicode)
compilers: gcc (GTK+2, OS X), vc++6(MSW)
(virtualization: vista 32bit, MS XP, MS95, MS98, Debian 3.1, Slackware 12, FreeBSD 6.1, a few more)
wx: 2.8.8/9 (unicode)
compilers: gcc (GTK+2, OS X), vc++6(MSW)