Rare exceptions aside, the rule
in Windows 7 is this: To install a program,
you need administrative credentials. Software installers—the programs that
install programs—typically create files in system folders (subfolders of
%ProgramFiles%) and keys in protected registry locations, and these are
actions that require elevated privileges.
Installing the program
files and registry keys in protected locations protects your programs
(hence, you) from tampering by malicious parties, but unless you have
disabled User Account Control altogether, you need to deal with UAC prompts to
complete the process. If you install a program while running under an
administrative account, a UAC prompt will request your consent for the actions the
installer is about to undertake. If you install while running under a
standard account, you will be asked to supply the name and password of
an administrative user.
Windows 7 employs installer-detection technology to determine when you have
launched an installation process. This technology enables the operating
system to request credentials at the time the process is launched,
rather than waiting until the installer actually attempts to write to a
protected location.
The system presumes that any
process with a file name containing particular keywords (such as install, setup, or update) or any process whose data includes particular
keywords or byte sequences is going to need elevated privileges to
complete its work, so the UAC prompt appears as soon as the installer
process begins. After you have satisfied the UAC mechanism, the process
runs in the security context of TrustedInstaller, a system—generated
account that has access to the appropriate secure locations.
The same technology that
detects an installation process also recognizes when you're about to
update or remove a program. So you can expect to see UAC prompts for
these activities as well.
No UAC prompt appears, and the install fails
If installer-detection
technology fails to detect your installer, and if your installer tries
to write to a protected area (in file storage or the registry), your
setup will fail—typically with an error message like this:
To solve this problem,
first do whatever is necessary to back out of the failed installation
(click OK, Exit, Cancel, or whatever else seems appropriate). Then try
to find the executable file for the installer. It will not be named Setup
or Install (because if it were, it would not have evaded the detector),
but it will be an .exe file. When you find it, right-click it in Windows
Explorer and choose Run As Administrator. Supply your administrative
credentials, and let the installer run.
|
After you install a program, Windows announces additions to the Start
menu by highlighting
the changes on the menu itself. It's reasonably intelligent about this;
it doesn't highlight additions that aren't programs (shortcuts to
documents, for example), it removes the highlight for items that you
ignore for at least a week, and it doesn't highlight anything that you
install within an hour of installing Windows itself. Nevertheless, some
users would rather it didn't highlight any Start-menu changes. If you're
in that camp, right-click the Start button and choose Properties. On
the Start Menu tab of the Taskbar And Start Menu Properties dialog box,
click Customize. Then, in the Customize Start Menu dialog box, clear
Highlight Newly Installed Programs.
|
The setup process hangs on reboot
If you launch a setup program as a standard user and supply the name and
password of an administrative account, and if the setup program requires a
system reboot to complete, you might not be able to complete the
installation unless you log back on (after the reboot) as that
administrative user, rather than under your own standard-user account.
Installer routines that include a reboot typically record post-reboot
instructions in the registry key
HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce. The value of the RunOnce key is, as the
key name suggests, run one time—and then discarded. The hitch is that
RunOnce values are executed only when an administrator logs on. If you
log on as a standard user, the RunOnce instructions are ignored, and
your setup process might appear to hang. The solution is to log off and
log back on as an administrator. To forestall problems of this kind, you
might want to adopt the practice of elevating your own account to
administrative status, using the User Accounts section of Control Panel,
before you begin installing
applications. Afterward, if you're more comfortable running as a
standard user, you can return to Control Panel and demote yourself.
|