[Source Database]

01/21/2023 08:02 makvee#1
Hi can anyone knows how to change the source browser from IE to Microsoft edge or google chrome etc? :handsdown:

Code:
BOOL GetIePath( LPSTR lpPath )
{	
	LONG result;
	HKEY hKey;
	DWORD dwType; 
	char data[MAX_PATH];
	DWORD dataSize = MAX_PATH+1;

	result	= ::RegOpenKeyEx ( HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\chrome.exe", 0, KEY_QUERY_VALUE, &hKey );
	if (result == ERROR_SUCCESS) 
	{
		result = ::RegQueryValueEx ( hKey, "Path", NULL, &dwType, (unsigned char *)data, &dataSize );
		strcpy( lpPath, data );
		lpPath[lstrlen( lpPath )-1]	= '\0';
	}
	else
		return FALSE;

	RegCloseKey( hKey );
	return TRUE;
}
This is not working
01/22/2023 12:11 makvee#2
bump
01/22/2023 13:28 Tweek™#3
There are a few reasons why this code might not work as intended. One possibility is that
the specified registry key, "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe",
does not exist on the user's machine. If this is the case, the call to RegOpenKeyEx will return the value ERROR_FILE_NOT_FOUND and the function will return FALSE.
Another possibility is that the dataSize variable should be initialize with the size of data buffer, and not MAX_PATH+1.
Also, this function will return path of chrome.exe rather than IE.
It's better to use the correct key for the IE path in the registry or use the function SHGetKnownFolderPath to get the location of Internet Explorer.
01/22/2023 15:49 makvee#4
Quote:
Originally Posted by Tweek™ View Post
There are a few reasons why this code might not work as intended. One possibility is that
the specified registry key, "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe",
does not exist on the user's machine. If this is the case, the call to RegOpenKeyEx will return the value ERROR_FILE_NOT_FOUND and the function will return FALSE.
Another possibility is that the dataSize variable should be initialize with the size of data buffer, and not MAX_PATH+1.
Also, this function will return path of chrome.exe rather than IE.
It's better to use the correct key for the IE path in the registry or use the function SHGetKnownFolderPath to get the location of Internet Explorer.
Do you have sample how to change the browser it self? can you help me to change the source IE browser to chrome please? :handsdown:
01/22/2023 18:26 Tweek™#5
Quote:
Originally Posted by makvee View Post
Hi can anyone knows how to change the source browser from IE to Microsoft edge or google chrome etc? :handsdown:

Code:
BOOL GetIePath( LPSTR lpPath )
{	
	LONG result;
	HKEY hKey;
	DWORD dwType; 
	char data[MAX_PATH];
	DWORD dataSize = MAX_PATH+1;

	result	= ::RegOpenKeyEx ( HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\chrome.exe", 0, KEY_QUERY_VALUE, &hKey );
	if (result == ERROR_SUCCESS) 
	{
		result = ::RegQueryValueEx ( hKey, "Path", NULL, &dwType, (unsigned char *)data, &dataSize );
		strcpy( lpPath, data );
		lpPath[lstrlen( lpPath )-1]	= '\0';
	}
	else
		return FALSE;

	RegCloseKey( hKey );
	return TRUE;
}
This is not working

Code:
BOOL GetChromePath( LPSTR lpPath )
{	
	LONG result;
	HKEY hKey;
	DWORD dwType; 
	char data[MAX_PATH];
	DWORD dataSize = MAX_PATH;

	result	= ::RegOpenKeyEx ( HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\chrome.exe", 0, KEY_QUERY_VALUE, &hKey );
	if (result == ERROR_SUCCESS) 
	{
		result = ::RegQueryValueEx ( hKey, "", NULL, &dwType, (unsigned char *)data, &dataSize );
		strcpy( lpPath, data );
		lpPath[lstrlen( lpPath )-1]	= '\0';
	}
	else
		return FALSE;

	RegCloseKey( hKey );
	return TRUE;
}
Quote:
BOOL GetChromePath( LPSTR lpPath )
{
HRESULT hr;
PWSTR path;

hr = SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &path);
if (SUCCEEDED(hr))
{
// Append "Google\Chrome\Application" to the path
wcscat_s(path, MAX_PATH, L"\\Google\\Chrome\\Application\\chrome.exe");

// Convert the path to a char array
wcstombs(lpPath, path, MAX_PATH);

CoTaskMemFree(path);
return TRUE;
}
else
return FALSE;
}
01/22/2023 18:54 makvee#6
Quote:
Originally Posted by Tweek™ View Post
Code:
BOOL GetChromePath( LPSTR lpPath )
{	
	LONG result;
	HKEY hKey;
	DWORD dwType; 
	char data[MAX_PATH];
	DWORD dataSize = MAX_PATH;

	result	= ::RegOpenKeyEx ( HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\chrome.exe", 0, KEY_QUERY_VALUE, &hKey );
	if (result == ERROR_SUCCESS) 
	{
		result = ::RegQueryValueEx ( hKey, "", NULL, &dwType, (unsigned char *)data, &dataSize );
		strcpy( lpPath, data );
		lpPath[lstrlen( lpPath )-1]	= '\0';
	}
	else
		return FALSE;

	RegCloseKey( hKey );
	return TRUE;
}
First code:
Still opening the IE browser in the webbox
[Only registered and activated users can see links. Click Here To Register...]

Thanks for the 2nd code but i got an error with "SHGetKnownFolderPath"

01/22/2023 19:08 Tweek™#7
you will need to include the shlobj.h header file and link to the Shell32.lib library to use this function.
01/22/2023 19:29 makvee#8
Quote:
Originally Posted by Tweek™ View Post
you will need to include the shlobj.h header file and link to the Shell32.lib library to use this function.
Can i sent you a private message? :handsdown:

Bump still not fix the webbox IE browser :feelsbadman:
01/28/2023 11:41 makvee#9
Bump, i need someone help to changed in game WEBBOX IE browser to Chrome
01/29/2023 15:29 M¿dScientist#10
you can look in to running something like CEF or Awsomium
02/03/2023 16:53 makvee#11
Quote:
Originally Posted by M¿dScientist View Post
you can look in to running something like CEF or Awsomium
Thanks for the reply anyways. What do you mean? what is CEF or Awsomium what are those?