PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0
Showing posts with label regedit. Show all posts
Showing posts with label regedit. Show all posts

Sunday, October 16, 2022

[FIXED] How to make my browser (such as Firefox) open a custom File Manager?

 October 16, 2022     explorer, firefox, regedit     No comments   

Issue

My system is Windows 11 build 22621. Now I use Tablacus Explorer to manage my files instead of Explorer.exe, however, many apps (such as Firefox or Control Panel) will still use Explorer.exe when I try to open directory or other something in those apps,even though I used some Tablacus's plugins such as Shell Execute Hook. Are there better methods to let other apps to auto open Tablacus as more as possible?


Solution

Add "Open Instead" and "System Tray" plugin to solve the problem.



Answered By - forestbat
Answer Checked By - Gilberto Lyons (PHPFixing Admin)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Wednesday, September 14, 2022

[FIXED] Where is Unity3D Project Wizard project list stored on Linux/Mac?

 September 14, 2022     cross-platform, linux, regedit, unity3d, wizard     No comments   

Issue

In Windows, the project list is stored on the Regedit at this location:

...

But where is this located on Linux or Mac? I want to do a program that need to use this paths.


Solution

for MacOS:

~/Library/Preferences⁩/com.unity3d.UnityEditor5.x.plist


Answered By - siusiulala
Answer Checked By - Mildred Charles (PHPFixing Admin)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Sunday, August 7, 2022

[FIXED] How can I read REG_NONE value in C++?

 August 07, 2022     c++, decimal, hex, regedit     No comments   

Issue

I want to read REG_NONE value from regedit with C++.

Here are my codes:

#include <iostream>
#include <windows.h>
using namespace std;

//--- Değişkenler ---//
//DWORD
DWORD dw_Rn_Boyut = MAX_PATH;
DWORD dw_Rn_Deger;
DWORD dw_Rn_DegerTipi = REG_NONE;

//HKEY
HKEY hkey_Rn;

//LONG
LONG long_Rn_Sonuc;

int main()
{
    long_Rn_Sonuc = RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\DownloadManager\\FoldersTree\\Compressed", 0, KEY_READ | KEY_WOW64_64KEY, &hkey_Rn);

    if(long_Rn_Sonuc == ERROR_SUCCESS)
    {
        long_Rn_Sonuc = RegQueryValueEx(hkey_Rn, "pathW", 0, &dw_Rn_DegerTipi, (LPBYTE)&dw_Rn_Deger, &dw_Rn_Boyut);

        if(long_Rn_Sonuc == ERROR_SUCCESS)
        {
            cout << dw_Rn_Deger;
        }
    }

    getchar();

    return 0;
}

My app shows 3801156 as result. This value is decimal version of that reg value. It equals to 3A 00 44

Here is the reg value which I want to read:

enter image description here

But why does not my app read other hex values?

How can I fix my problem?


Solution

There is no such thing as a REG_NONE value. On success, your dw_Rn_DegerTipi variable will be updated with the actual value type (in this case, REG_BINARY), and your dw_Rn_Boyut variable will be updated with the number of actual bytes read.

Your problem is that you are using the wrong data type for your dw_Rn_Dege variable. The data in question is not a DWORD value, it is a WCHAR character string, so you need a WCHAR character buffer to receive it. You are telling RegQueryValueEx() that you allocated a buffer to hold MAX_PATH bytes, but you really didn't. So you have a buffer overflow error in your code when RegQueryValueEx() tries to write more than 4 bytes to the memory address of dw_Rn_Deger.

Try this instead:

#include <iostream>
#include <windows.h>
using namespace std;

//--- Değişkenler ---//
WCHAR sz_Rn_Deger[MAX_PATH+1] = {};
DWORD dw_Rn_Boyut = MAX_PATH * sizeof(WCHAR);

//HKEY
HKEY hkey_Rn;

//LONG
LONG long_Rn_Sonuc;

int main()
{
    long_Rn_Sonuc = RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\DownloadManager\\FoldersTree\\Compressed", 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &hkey_Rn);

    if (long_Rn_Sonuc == ERROR_SUCCESS)
    {
        long_Rn_Sonuc = RegQueryValueExW(hkey_Rn, L"pathW", NULL, NULL, reinterpret_cast<LPBYTE>(&sz_Rn_Deger), &dw_Rn_Boyut);

        if (long_Rn_Sonuc == ERROR_SUCCESS)
        {
            wcout << sz_Rn_Deger;
        }

        RegCloseKey(hkey_Rn);
    }

    getchar();

    return 0;
}


Answered By - Remy Lebeau
Answer Checked By - Robin (PHPFixing Admin)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Older Posts Home

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments

Copyright © PHPFixing