Re: Installing IE toolbar for one user only
From: Cristian Amarie (cristianamarie_at_hotmail.com)
Date: 03/24/05
- Next message: Martin Ng: "Cannot disable the Confirm Open After Download dialog box"
- Previous message: Zach: "IE Toolbar Custom Images & Bitmaps"
- In reply to: Jan: "Re: Installing IE toolbar for one user only"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 24 Mar 2005 19:37:41 +0200
Yes it is, but I'm not very sure how. From what I see in my registry there
is only a single key named CmdMapping, containing several values associated
by installed extension.
Name Type Value
Default REG_SZ ""
(GUID) REG_DWORD 0x00002000
(GUID) REG_DWORD 0x00002001
(GUID) REG_DWORD 0x00002002
NextId REG_DWORD 0x00002003
>From what they look like it seems are command IDs used by the parent rebar
control (possibly also by IOleCommandTarget ?).
But this is only a guess...
Cristian
"Jan" <biteme@nospam.com> wrote in message
news:eqYtmyIMFHA.244@tk2msftngp13.phx.gbl...
> Hi Cristian,
>
> Thanks for your reply. That technique would certainly work.
>
> I take it the registry key HKCU\Software\Microsoft\Internet
> Explorer\Extensions isnt used by IE?
>
> Jan
>
> "Cristian Amarie" <cristianamarie@hotmail.com> wrote in message
> news:#nj2sNIMFHA.580@TK2MSFTNGP15.phx.gbl...
>> The registration should be kept on HKLM, otherwise the extension won't be
>> recognized.
>> You can try to:
>> - set up a custom key/value name to save/load the user name (as well as
>> other informations as needed);
>> - modify the code of DllMain in order to load the user name from registry
>> - get the current user name;
>> - compare the registry value with the current user name;
>> - if they matches, continue with the normal loading, else you can either
>> return FALSE from DllMain so the dll won't be loaded.
>>
>> A similar technique is used when the extension doesn't want to be loaded
> on
>> explorer.exe, but only on IExplore.exe:
>>
>> BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwCallReason, LPVOID
>> pvReserved)
>> {
>> TCHAR szRegUserName[UNLEN + 1];
>> TCHAR szCurUserName[UNLEN + 1];
>>
>> GetUserName(szCurUserName);
>> /* read from registry into szRegUserName */
>> if ( lstrcmp(szRegUserName, szCurUserName) != 0) {
>> return FALSE; /* do not load extension for other user(s) */
>> }
>>
>> /* normal DllMain implementation */
>> return TRUE;
>> }
>>
>> (Note. Error checking and registry read is stripped).
>>
>> Cristian Amarie
>>
>>
>> "Jan" <biteme@nospam.com> wrote in message
>> news:%23%23BPecxLFHA.2384@tk2msftngp13.phx.gbl...
>> > Hi,
>> >
>> > I'm trying to install an Internet Explorer toolbar so that it appears
> for
>> > the installing user only. As I understand it changing the registry keys
>> > from
>> > HKLM to HKCU should achieve this however when I do this the toolbar
> doesnt
>> > appear. Is there something else I have to change?
>> >
>> > Here is the registration code.
>> >
>> > STDAPI DllRegisterServer(void)
>> > {
>> > // registers object, typelib and all interfaces in typelib
>> >
>> > HKEY hKey = NULL;
>> >
>> > RegCreateKeyEx(HKEY_CURRENT_USER,
>> > _T("Software\\Microsoft\\Internet Explorer\\Toolbar"),
>> > 0,
>> > NULL,
>> > REG_OPTION_NON_VOLATILE,
>> > KEY_WRITE,
>> > NULL,
>> > &hKeyLocal,
>> > NULL);
>> >
>> > RegSetValueEx(hKey,
>> > _T("{19BDA04B-AACD-46ED-B2FA-5C71B289B131}"),
>> > 0,
>> > REG_BINARY,
>> > NULL,
>> > 0);
>> >
>> > RegCloseKey(hKey);
>> >
>> > return _Module.RegisterServer(TRUE);
>> > }
>> >
>> > // Here is the .rgs file
>> >
>> > HKCR
>> > {
>> > MVToolbar.MVToolbarObj.1 = s 'MV'
>> > {
>> > CLSID = s '{19BDA04B-AACD-46ED-B2FA-5C71B289B131}'
>> > }
>> > MVToolbar.MVToolbarObj = s 'MV'
>> > {
>> > CLSID = s '{19BDA04B-AACD-46ED-B2FA-5C71B289B131}'
>> > CurVer = s 'MVToolbar.MVToolbarObj.1'
>> > }
>> > NoRemove CLSID
>> > {
>> > ForceRemove {19BDA04B-AACD-46ED-B2FA-5C71B289B131} = s 'MV'
>> > {
>> > ProgID = s 'MVToolbar.MVToolbarObj.1'
>> > VersionIndependentProgID = s 'MVToolbar.MVToolbarObj'
>> > ForceRemove 'Programmable'
>> > InprocServer32 = s '%MODULE%'
>> > {
>> > val ThreadingModel = s 'Apartment'
>> > }
>> > 'TypeLib' = s '{DC9180A4-6B8D-462C-9ADE-65975BD956E4}'
>> > }
>> > }
>> > }
>> > HKCU
>> > {
>> > Software
>> > {
>> > Microsoft
>> > {
>> > 'Internet Explorer'
>> > {
>> > Extensions
>> > {
>> > ForceRemove {D1EDFDDA-9EA5-4985-B8BA-2DCB1A479D3B} = s 'MV'
>> > {
>> > val BandClsid = s '{19BDA04B-AACD-46ED-B2FA-5C71B289B131}'
>> > val Clsid = s '{E0DD6CAB-2D10-11D2-8F1A-0000F87ABD16}'
>> > val 'Default Visible' = s 'Yes'
>> > }
>> > }
>> > }
>> > }
>> > }
>> > }
>> >
>> > Am I missing something?
>> >
>> > Thanks,
>> >
>> > Jan
>> >
>> >
>>
>>
>
>
- Next message: Martin Ng: "Cannot disable the Confirm Open After Download dialog box"
- Previous message: Zach: "IE Toolbar Custom Images & Bitmaps"
- In reply to: Jan: "Re: Installing IE toolbar for one user only"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|