Sam said:
Where does the article say that? What if a COM object truly does need
Administrator privileges, your statement is saying that it cannot be
done in a COM object. That article even says "There will still be
circumstances when an application needs administrative privileges to
carry out certain processes, especially if the application is written
for administrator use.".
I did not say that it cannot be done with a COM object. I am saying that
in order for the COM legacy solution application to execute, a COM
object execution is on a given process/thread and it may need privileged
escalation to execute.
Even a .NET solution may need its rights escalated if the solution is
doing administrative tasks, like making registry changes as an example.
But the bottom line is to make the application run with only requiring
Standard user rights or least privilege, which most software developers
bluntly disregard and everything runs with full-admin-rights when 9
times out of 10 it is not required.
But that was also due to Limited account rights on XP solutions not
being able to run properly, so it became full-rights execution for just
about everything written on the XP platform.
For Vista and Win-7, if it calls for the application to be leveraged to
use Standard user rights only on a rewrite of code, then so be it.
One thing that is happening is more and more code for the MS platform
are being written in .NET, which is managed code using the CLI/CLR. And
they are looking at code intent to prevent things if hostile or dubious
intent is determined with in the code, before it is executed and stop
the execution.
However, that can be circumvented by a COM object code being called in
the solution that is not manageable by the CLI/CLR. And therefore, the
push is being made to eliminate/eradicate COM off the MS O/S platform.
Of course, not everyone will be going to .NET, and if it's not broke
them don't fix it, legacy COM solutions.
<
http://msdn.microsoft.com/en-us/library/bb530410.aspx>
<copied>
How Do I Determine If My Application Has Administrative Dependencies?
To assist developers, ISVs, and organizations in evaluating their
applications, Microsoft provides the Microsoft Standard User Analyzer.
The Standard User Analyzer can be used to help identity
non-UAC–compliant behavior of an application. Microsoft recommends that
developers run this tool to identify issues with running the application
under a standard user account. These tests should be performed, even if
the application already installs and runs properly under a standard user
account on Windows XP. The application may perform operations, such as
attempting to write to system registry locations, and make decisions
based on the system's behavior, such as looking for an error response.
Windows Vista may behave differently than earlier versions of the
Windows operating system due to the addition of new application
compatibility support. Therefore, it is recommended that all
applications be tested with the new version of the Standard User Analyzer.
The Standard User Analyzer will record all administrative operations
encountered by an application, including registry/file system access and
elevated API calls. This data is stored in a log file and is displayed
within the tool. The Standard User Analyzer identifies the following
common dependencies, in addition to many others:
<copied>