How to Auto-Update a BHO

JeffMarx12

New member
Jun 22, 2007
11
0
0
I'm having a developer create a BHO (.dll) for me. He's doing it in VC++ 6.0. The BHO needs to be able to do a silent, auto-update when we release an updated version. Developer came back with:

there is a serious problem if you want to silently update the dll , however reboot or not.
on vista, win7, it need admin permission. so your dll must be signed by certificate
on vista, win7, IE7, 8 both have strong security mechanism..
after downloading the new version of dll
then I called MoveFileEx (windows API function) to move the new dll to destination - original path installed., and I specified that this action will be happened at next time reboot, MoveFileEx will write a registry value to tell windows OS for this action, the registry value will be written under HKEY_LOCAL_MACHINE root, it need to get Admin or System permission
Any ideas on how to get this to work (other than buying a cert.)? I heard something about using wininet.dll calls, but it went over my head.
 


From what I've seen, I don't think you can "silently update" a damn thing on vista.
 
When you install the first time if you prompt then why not run the command to disable UAC? (User Account Control) - then - no more prompts..

I'd at least list it in your TOS tho...

Vista has the command listed for that in Msconfig -> Tools its listed as Diable UAC.
 
When you install the first time if you prompt then why not run the command to disable UAC? (User Account Control) - then - no more prompts.

Any idea how you'd do that programmatically (work with Vista and Win7)? As in, if my BHO needs to update, disable UAC, install update, then re-enable UAC.

I'd at least list it in your TOS tho...

Yes, absolutely.

Thanks!
 
Well, it looks like I could disable UAC by changing the EnableLUA reg. value to 0. But a reboot would be necessary to make the change active. So that complicates installing a BHO update. Then you have the problem of turning the UAC back on. Of course you can change the EnableLUA back to 1, but I assume that would also take a reboot to go into effect. That could potentially leave the user's computer "unprotected" for a considerable time.