What happens when I write an application that needs to be done “administered”?
How to write files on C:\Program Files- when the application tries to do this, what will happen? Will a message appear asking for the password from the user? Will there be an exception? Will the program be completed and the computer explode? All of the above?:)
C:\Program Files
On the other hand: are Windows 7 users logging in as administrators by default?
, Windows Vista Windows 7 , , . Microsoft . - .
, . UAC , , . , , .
: Windows 7/Vista - , , , . , , ; API- - , GetLastError() ERROR_ACCESS_DENIED. , API , , , - API- Windows.
GetLastError()
ERROR_ACCESS_DENIED