views:

344

answers:

2

Hi according to Non-Admin ActiveX Controls, it is possible to register activeX under current user (that will not require admin right during the installation). I have crated ATL project (VS2008, native) and added some ATL Control that does nothing.

I created an inf file:

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

[Add.Code]
     Batman.dll=Batman.dll

[Deployment]
    InstallScope=user

[Batman.dll]
    file-win32-x86=thiscab
    clsid={2C10EC82-2BF3-4ED5-8AFC-E5146C672B3D}
    FileVersion=1,0,0,1
    RegisterServer=yes

Add both the dll and inf into CAB and signed it. I load an ActiveX from simple html page

<OBJECT ID="sampleControl" CLASSID="CLSID:2C10EC82-2BF3-4ED5-8AFC-E5146C672B3D" CODEBASE="Batman.cab#Version=1,0,0,1"></OBJECT>

And it does not register it under current user anyhow.

I case I specify InstallScope=machine there is not problem the activeX is loaded.

Any idea what should be done ?

Thanks

A: 

Try this, at least it works for me:

[Deployment]    
  InstallScope=user|machine

[Batman.dll]
  file-win32-x86=thiscab
  clsid={2C10EC82-2BF3-4ED5-8AFC-E5146C672B3D}
  FileVersion=1,0,0,1
  RegisterServer=yes
  RedirectToHKCU=yes

Non-Admin ActiveX Controls

Eugene
Thanks, when I have modified my inf, when I log in as non-admin and try to access the page that loads ActiveX, I receive a prompt if I want to install it for machine or for current user. Even if I choose to install it for the current user, the ActiveX is not loaded. I also cannot find it on HD or registry... Do you think there is a need to modify rgs file or any addition needed in the HTML page?Thanks
Zaky
I think the cause is not in “Non-admin” feature. At least in my case INF file modifications were enough. I didn’t touch any other files. You can try to install it for all users, just for testing. Make sure that version numbers are identical (1,0,0,1 != 1.0.0.1), make sure you use right clsid in INF file.
Eugene
A: 

Hi,

I have a similar inf file and cab, when IE ask to install the activeX for a non-admin user, I only have the possibility to "install this add-on for all users on this computer..." Me i need to install only for that user.

How i can enable that option?

OS is Windows 7 enterprise

IE 8

Patrick
Well, you need to have ATL 8 and greater to enjoy that feature. Otherwise if you will look into files generated by the ATL wizard, you don't have a Register for a current user flag.Since I have been worked on some legacy code and couldn't upgrade the ATL, just prepared some MSI installation file with registry settings for HKCU and suggested to user install it that way.
Zaky