0

I have made a browser plugin and tried to deploy it from a .cab file in IE. And it's per-user install. My problem is in Windows XP, The installation works well in different users. However, in Windows 7, when open the page including the .cab, the .cab file is downloaded and extracted, but when I click 'install' button, nothing happens.

Here's .inf file:

[version]
Signature="$CHICAGO$"
AdvancedINF=2.0

[Deployment]
InstallScope=user

[Setup Hooks]
hook1=hook1

[hook1]
run=%EXTRACT_DIR%\MyPlugin.exe

'MyPlugin.exe' is in the .cab file too.

Note that there's a [Deployment] segment in the code, I get it from MSDN, if delete this segment, it can install in Win7, but UAC popup and I need to enter admin password. But the browser plugin I made is for per-user, I think it should not need the admin privilege here.

UPDATE: Now I find that IE doesn't request admin privilege only when browsing the page from intranet, otherwise, it will still request admin privilege if browsing from internet, so I doubt that IE will force using admin privilege to execute the hook to install .exe file.

Michael Bai
  • 586
  • 1
  • 4
  • 13

2 Answers2

0

If your %EXTRACT_DIR% is anywhere outside of \users\%user%\ or any subdirectories then it will require administrator password: ie. Programfiles.

Ace
  • 463
  • 3
  • 6
  • 16
0

You are probably not registering your plugin under HKEY_CURRENT_USER , for the deployment to work without the UAC popup popping out correctly on Windows 7. According to MSDN your plugin needs to be registered under HKEY_CURRENT_USER : On both Windows XP and Windows Vista, non-administrators are prevented from installing any ActiveX on their own. But now an **ActiveX registered under the HKEY_CURRENT_USER** hive is now fully supported by Internet Explorer within the context of a user's privilege level.

stamhaney
  • 1,246
  • 9
  • 18
  • Hi, I've updated my description, I use the Wix code that FireBreath generated, it has registering my plugin under HKCU, I think. – Michael Bai Dec 17 '12 at 07:30
  • Can you try out taxilians answer, if it solves your problem: [link](http://stackoverflow.com/questions/338657/can-you-install-an-activex-control-in-ie-without-having-administrator-privileges) . Also, I think updating the run section in the inf to : 'run=msiexec.exe /i %EXTRACT_DIR%\MyPlugin.exe' would help – stamhaney Dec 17 '12 at 09:58
  • I think the parameter of msiexec.exe is a msi file, but I encapsulate my msi into an exe file using dotNetInstaller. – Michael Bai Dec 17 '12 at 10:01
  • You can substitute the exe with the msi, of course the CAB will need to contain the msi – stamhaney Dec 17 '12 at 10:08
  • I need to support multi-language install, so I encapsulate the msi into exe using dotNetInstaller. So I need to run the exe directly, not the msi. – Michael Bai Dec 18 '12 at 01:15
  • If you haven't tried yet, with the above inputs, can you check if you are still not able to install on windows 7 – stamhaney Dec 18 '12 at 04:25
  • Do you mean try the code 'run=msiexec.exe /i %EXTRACT_DIR%\MyPlugin.exe' and replace the suffix of .exe file to .msi, I think both of them will not work with msiexec.exe, it will not be executed. – Michael Bai Dec 18 '12 at 06:39