Hi ts-soft. You're absolutely right, it works without atl.dll; I should've tested more thoroughly. Thank you for pointing that out.ts-soft wrote:The ATL.dll is installed on all windows versions >Win9x! The webgadget runs fine without the old ATL.dll from Compilers dir...
Hi LuCiFeR[SD], and thanks for the valuable tip; it works perfectly on both WinXP as well as Win7. Never would have figured that out.LuCiFeR[SD] wrote:add this to the registry...
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\Feature_Browser_Emulation]"yourExecutableName.exe"=dword:00002328
Hello again Alan. Seems that LuCiFeR[SD] has found the solution. However, to answer your questions, this registry change has to be effected on any and all machines that are going to run the WebGadget() application for it to be able to use the latest/installed browser version. But the good news is, it's a painless and harmless registry entry that should not trigger any blocks or alarms, and it can be done from within your PureBasic application. I've written this short routine to validate the required registry entry, and consequently create it or modify it accordingly. You can place it at the top of an installation program, or even in the WebGadget() application itself:AlanFoo wrote:...Does this solution needs all our end users' registries to be changed accordingly? Changing clients' registry setttings I try to avoid as much as I can. Am not sure... but can the .reg be directy run from PB runprogram like runprogram("c:\sample.reg") and it will update the registry directly? Have not tried that yet. Will anti virus software stops it?
Code: Select all
EnableExplicit
Define.s keyName, dwLabel, statusMsg, keyResult.i
Define.l dwValue, dwValueCheck, bufferSize
keyName = "Software\Microsoft\Internet Explorer\Main\FeatureControl\Feature_Browser_Emulation\"
dwLabel = "MyApplicationName.exe"
dwValue = 9000
bufferSize = SizeOf(Long)
If RegOpenKeyEx_(#HKEY_CURRENT_USER, keyName, 0, #KEY_ALL_ACCESS, @keyResult) = #ERROR_SUCCESS
If keyResult And RegQueryValueEx_(keyResult, dwLabel, 0, 0, @dwValueCheck, @bufferSize) = #ERROR_SUCCESS
If dwValueCheck = 9000 Or dwValueCheck = 8000
RegCloseKey_(keyResult)
statusMsg = "Entry Exists: Currently Set for IEv" + Str(dwValueCheck / 1000)
Else
If RegSetValueEx_(keyResult, @dwLabel, 0, #REG_DWORD, @dwValue, SizeOf(Long)) = #ERROR_SUCCESS
RegCloseKey_(keyResult)
statusMsg = "Existing Value Modified: WebGadget() set For IEv9"
EndIf
EndIf
Else
If RegSetValueEx_(keyResult, @dwLabel, 0, #REG_DWORD, @dwValue, SizeOf(Long)) = #ERROR_SUCCESS
statusMsg = "New Value Created: WebGadget() set for IEv9"
EndIf
EndIf
Else
If RegCreateKey_(#HKEY_CURRENT_USER, keyName, @keyResult) = #ERROR_SUCCESS
If RegSetValueEx_(keyResult, @dwLabel, 0, #REG_DWORD, @dwValue, SizeOf(Long)) = #ERROR_SUCCESS
statusMsg = "New Entry Created: WebGadget() set for IEv9"
EndIf
EndIf
EndIf
MessageRequester("WebGadget Emulation:", statusMsg)