Home Computer Tutorials Computer Knowledge Local registry pointing tool under winpe

Local registry pointing tool under winpe

Feb 09, 2024 pm 03:20 PM
winpe Registry tools

php editor Banana introduces you a practical tool - the local registry pointing tool under WinPE. In the WinPE system, since there is no ability to directly access the local registry, we cannot modify or query the registry information. This tool provides a simple and effective solution that can point the WinPE system's registry to the local system, allowing us to easily operate the registry. Whether it is fixing system problems or performing system maintenance, this tool can help us save time and energy.

The location where this information is recorded in the registry is:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

Therefore, as long as we can access the registry At this location, you can get the name and installation path information of some software.

This blog post uses C# to access the registry to obtain the software installation path and display it.

1 Description of the main screen of the sample program

The main screen of the sample program is as shown below.

Local registry pointing tool under winpe

Enter the name of the executable program in the text box on the screen, and then click the "Get Path" button. Next, the next line of the screen will display the complete installation path information of the program. Note that the executable name you enter must be the name of the program in the registry. For example, the name of Adobe Reader in the registry is "AcroRd32.exe".

2 Complete code of sample program

using System;

using System.Windows.Forms;

using Microsoft.Win32;

namespace GetSoftWarePathExp

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

private void button1_Click(object sender, EventArgs e)

{

try

{

string softName = textBox1.Text.ToString();

string strKeyName = string.Empty;

string softPath = @\"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\\";

RegistryKey regKey = Registry.LocalMachine;

RegistryKey regSubKey = regKey.OpenSubKey(softPath softName \".exe\", false);

object objResult = regSubKey.GetValue(strKeyName);

RegistryValueKind regValueKind = regSubKey.GetValueKind(strKeyName);

if (regValueKind == Microsoft.Win32.RegistryValueKind.String)

{

this.label3.Text = objResult.ToString();

}

}

catch

{

this.label3.Text = \"Friend, failed to obtain the program path!\";

}

}

}

}

Note: Need to add reference: using Microsoft.Win32;

3 Code Description

(1) The code "RegistryKey regKey = Registry.LocalMachine" makes regKey point to the registry primary key HKEY_LOCAL_MACHINE .

(2) The code "RegistryKey regSubKey = regKey.OpenSubKey(softPath softName \".exe\", false)" makes regSubKey point to the registry subkey we need to find.

(3) The code "object objResult = regSubKey.GetValue(strKeyName)" obtains the key value of the registry.

(4) Code "RegistryValueKind regValueKind = regSubKey.GetValueKind(strKeyName)" obtains the key value type of the registry.

(5) Finally output the obtained key value information.

(6) If there is an error in the program, the prompt message "Friend, failed to obtain the program path!" will be output.

Note: Both the RegistryKey.GetValue and RegistryKey.GetValueKind methods need to pass in a parameter to indicate the name of the value to be retrieved. When the parameter passed to the RegistryKey.GetValue and RegistryKey.GetValueKind methods is an empty string, What is retrieved is an unnamed value. When this unnamed value is displayed in the Registry Editor, the string "(Default)" will be displayed instead of displaying a name. In this example, an empty string is passed in. If we take the installation information of the software Adobe Reader as an example, we will get the first registry information in the figure below. At this time, the name item displays the string "( default)".

Local registry pointing tool under winpe

4 Program running results

(1) Get the installation path of Adobe Reader

Enter "AcroRd32", click "Get Path", and get the following results, yes It is not consistent with the information recorded in the registry.

Local registry pointing tool under winpe

2) Get the installation path of chrome

Enter "chrome", click "Get Path", and you will get the following results. Is it consistent with the information recorded in the registry?

Local registry pointing tool under winpe

5 A few more words

In development, sometimes a specific program is designated to perform a certain type of operation, which may involve reading registry information to open the program. It's just that some programs may not have such registration information. In this case, we must take other methods.


The above is the detailed content of Local registry pointing tool under winpe. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Detailed explanation of WinPE installation depth of Linux and PE installation depth of Linux system Detailed explanation of WinPE installation depth of Linux and PE installation depth of Linux system Feb 09, 2024 pm 05:33 PM

Deepin Linux is an operating system based on the open source Linux kernel. It is stable, safe, and easy to use. This article will introduce how to install Deepin Linux using WinPE and PE systems. WinPE installs Deepin Linux. WinPE is a lightweight Windows pre-installation environment that can be used for system maintenance and repair. Using WinPE to install Deepin Linux requires the following steps: 1. Download the ISO image file of Deepin Linux and extract it to a FAT32 format. USB flash drive or mobile hard disk. 2. Download and create a WinPE bootable USB disk or CD. 3. Insert the prepared WinPE boot USB disk or CD into the computer, restart the computer and enter WinPE

Nothing happens when the winpe tool starts Nothing happens when the winpe tool starts Feb 13, 2024 pm 11:21 PM

As soon as the computer is turned on, it is prompted to repair the system, but it cannot be repaired. What should I do? First, try pressing the F8 key or pressing the Fn and F8 keys simultaneously to start the computer. Select the last correct configuration to enter the system. If this doesn't work, consider other solutions. When I started my computer today, I encountered a system repair prompt. I followed the prompts step by step to fix it, but it didn't work. So I tried to enter safe mode again and considered using 360 Security Guard to repair the system. However, I found that I could not enter safe mode and still could only enter the automatic repair interface. I tried again and used the repair system startup tool in the PE environment to repair it, but it still didn't work. Although I didn't want to reinstall the system, I still searched online to find out

Local registry pointing tool under winpe Local registry pointing tool under winpe Feb 09, 2024 pm 03:20 PM

Most software basically records its name and installation path information in the registry. The location where this information is recorded in the registry is: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppPaths. Therefore, as long as we can access this location in the registry, we can obtain the name and installation path information of certain software. This blog post uses C# to access the registry to obtain the software installation path and display it. 1 Description of the main screen of the sample program The main screen of the sample program is shown in the figure below. Enter the name of the executable program in the text box on the screen and click the "Get Path" button. Next, the next part of the screen

How to start win10pe system How to start win10pe system Dec 26, 2023 pm 05:27 PM

Many friends who use the win10 system will be exposed to the pe system, but many do not know how to enter the system. Today I will bring you the method of entering the win10pe system. If you want to know, come and take a look. How to enter the win10pe system: 1. First turn on the computer and then press the F12 and DEL keys continuously to try to enter the bios interface. 2. After entering, use the direction keys to select "security", then select "secureboot" and press Enter to enter. 3. Next select "secureboot" and press Enter to open the option. 4. After opening, select "disabled" and press Enter to confirm. 5. After turning off the secureboot function, select the "star" at the top

How to enter win7pe system How to enter win7pe system Jul 16, 2023 pm 06:49 PM

How to enter win7pe system? After a problem occurs on the win7 computer, you need to enter the pe system to solve it, but does everyone know how to enter it? Today I will introduce to you the detailed entry method of win7pe system. If necessary, let's take a look at how to enter the win7pe system. How to enter the win7pe system: 1. Download and install the Chinese cabbage pe boot disk creation tool, identify the U disk and click OK. 2. After waiting for a while, you will be prompted to complete the production, click OK. 3. Then press F12 to bring up the dialog box, select the USBkey option, and press Enter. 4. At this point, you will enter the startup boot interface, select 02 to run the Chinese cabbage win8pex86 streamlined version.

Apple winpe install win7 Apple winpe install win7 Feb 11, 2024 pm 06:39 PM

I like using Apple Mac computers, but after I started using them, I found that I was not used to Apple's operating system, and I am still used to using Windows systems. We can install Windows systems on Apple Mac computers, enjoy the Apple appearance, and operate Windows systems. Here I will introduce to you how to install dual systems, which is to install the Windows system without affecting the built-in Apple system. After installation, the Windows system will automatically run on boot. Before starting the operation, we need to do some preparations. First, make sure you have prepared a 64-bit pure version of win7 ghsot system image. Secondly, you also need a bootable USB disk with a PE system created. If you don’t have these yet, you can download wi online

Graphical demonstration of winpewin7 system installation tutorial Graphical demonstration of winpewin7 system installation tutorial Jul 18, 2023 pm 06:41 PM

When the win7 system has a blue screen, black screen, system crash, etc. and cannot enter the system, we can use a USB flash drive to make a winpe boot disk and reinstall the system to repair it. So how to install win7 system on USB flash drive? The editor below will teach you the installation tutorial of winpewin7 system. The specific installation steps are as follows: 1. We first find an available computer, download and install Xiaobai's one-click system reinstallation tool on the computer and open it, insert a blank USB disk of more than 8g, select the USB disk reinstallation system mode and click start Make. (Note that important data in the USB flash drive must be backed up first) 2. Select the win7 operating system that needs to be installed and click to start production. 3. The software starts to automatically download system images, drivers and other files, and waits for the USB boot disk to be produced.

How to use the Win10PE installation tool: How to install the Win10 operating system How to use the Win10PE installation tool: How to install the Win10 operating system Dec 28, 2023 pm 03:44 PM

Many users do not know how to use the U-boot win10pe installation tool. This tool can help users install the win10pe system safely and stably for use. As long as they can make a boot U disk and use the U disk to enter the system, they can install it. How to install win10 using the u-start win10pe installation tool: The first step is preparation: 1. First prepare the USB boot disk 2. Then download the image file of the win10 system and copy it to the USB boot disk. The second step is to start the installation. 1. When ready, insert the U disk into the computer. On the desktop, insert the U disk into the interface behind the host box. Restart the computer. When the startup screen appears, press the U disk startup shortcut key to enter. Ustart interface. 2. Enter the tool interface and select your current impression file path.

See all articles