Closed Bug 362388 Opened 17 years ago Closed 17 years ago

On Windows Vista RC2, installing Java fails, the Compatibility Assistant applies ELEVATECREATEPROCESS

Categories

(Toolkit Graveyard :: Plugin Finder Service, defect)

x86
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 352762

People

(Reporter: cirdan, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; hu; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; hu; rv:1.8.1) Gecko/20061010 Firefox/2.0

On Windows Vista RC2 (Build 5744) the Plugin Finder Service cannot install the Java plugin, and the Compatibility Assistant in Windows Vista applies ELEVATECREATEPROCESS setting on Firefox detecting that Firefox tried to start an installer child process in non-administrator mode.

Reproducible: Always

Steps to Reproduce:
1. Install firefox
2. Open a page with a Java applet
3. Allow the Plugin Finder service to install Java (installation fails)
4. Close Firefox

Actual Results:  
Java is not installed, after closing the browser, the Compatibility Assistant of Vista tells that compatibility settings have been applied on Firefox.

Expected Results:  
Java is installed correctly, no special compatibility entries are generated.

Using Windows Vista RC2 (Build 5744) I wanted to install Java with the Plugin Finder Service. The installation failed. When I closed Firefox later, the Compatibility Assistant came up saying there was a compatibility error and Vista applied compatibility settings. Checking the Compatibility Wizard it turns out that the setting was ELEVATECREATEPROCESS. This happens when an application launches a child process that is an installer and needs to be run with administrator privileges. For more info see: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnlong/html/AppComp.asp
(in the section "Detecting program failures while trying to launch installers" close to Figure 12.)
If I understand correctly, this means that after this setting is applied on Firefox, it will always run in administrator mode to avoid the problems.
It seems that Java can only be installed by an administrator. Did you try to unstall the Java from Sun without Admininistrator mode because the whole Java Plugin installation package is from Sun.

(In reply to comment #1)
> It seems that Java can only be installed by an administrator. Did you try to
> unstall the Java from Sun without Admininistrator mode because the whole Java
> Plugin installation package is from Sun.
> 

I know that Java is a 3rd party install. The user I was logged in with was an administrator user. However, in Vista even if you are logged in with an administrator, you have to explicitly allow each process to elevate to administrator mode and do install, make registry changes, etc. 

Reading the document I have referred to, if a process tries to do something like that, is terminated and an error is returned. If it happens with explorer (not IE, but the other explorer), it detects that and triggers the UAC (User Account Control) and asks for confirmation from the user that the installation was intentional. I was able to install the Java plugin downloading it from Sun's site, and installed without problems outside the browser, but with the same user. The only thing that didn't work was to install it using the Plugin Searching module. 

After detecting this, Compatibility Assistant automatically applied this ELEVATECREATEPROCESS setting to Firefox, so the next time it will automatically elevate created processes to avoid the problem to recur. However, in my opinion, in the long term Firefox should work correctly without any special compatibility hacks on Vista's side. Moreover, I guess it could lead into further problems that the OS will ask for admin permissions for each process created by Firefox.

I didn't want to copy large parts here from the MS documentation, but it is a small part in a quite a large document, so I copy it here for your convenience:

--- Quote starts ---

Here the test program was trying to launch an updater which is required to run as administrator and failed. In this case, PCA will apply the ELEVATECREATEPROCESS compatibility mode, which will enable the program to successfully launch the child exe as administrator the next time. Now when the program is run the next time and while trying to launch the updater, it will not fail and will successfully run as administrator. The user will see the UAC consent UI.

More details on what happens under the covers is explained through Q/A below.

   1. What is the detection logic and how does PCA know that the program failed to launch a child exe which needs to run as administrator?

      The detection for this scenario is accomplished through instrumentation at the CreateProcess API to detect the cases when a child process launch fails due to the requirement to run as administrator.
   2. Why are there no options in this PCA dialog?

      Due to the high confidence on the issue detection in this scenario, the solution (ELEVATECREATEPROCESS compatibility mode) is automatically applied and the user is not given any options. 

--- Quote ends ---

*** This bug has been marked as a duplicate of 352762 ***
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Product: Firefox → Toolkit
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.