When adding an external program to PE, sometimes you need to write registry information for the added program. How can this be done? Here is an introduction.
Use Regsnap to trace and analyze the contents of the software to be added to the registry in a standard Windows environment, then export the registry modification entries and rewrite them into batch files and save them in the directory where the software is located. .
For example, the registration information of the ACDSEE programs is tracked and saved:
X:PROGRAMS graphic image ACDSEEACDSEE.CMD
It is recommended to refer to X:PROGRAMS graphic image ACDSEE The way the program is saved saves the software you want to add. The principle is to store it in the same directory as the main program (including the icon files that may be used), so that you can maintain the changes later. Create a registration batch file of your own application with reference to the format and style of the ACDSEE.CMD registration batch.
Note: In order to ensure that these scripts can be run in both the PE environment and the standard Windows environment, we need to detect the actual path or drive letter of the program.
When creating a batch, the first two lines are used to detect the current directory location, and the variables to be retained and referenced:
SET Var0=%0
FOR /f "delims=" %%I in ("%Var0%") do Set OP=%%~dpI
The above two lines are used to detect the path of the current batch. Obtain the drive letter of the partition in which it is located, so use %OP% in the subsequent batch as the partition number to be used in the plugin path. %OP% is only relevant to the drive letter, regardless of the path, so you need to add a detailed path to the drive letter variable %OP% in your batch. For example:
REG ADD HKCRACDC_JIFShellACDSEEenCommand /ve /t REG_SZ /d ""%OP%ACDSEE.EXE" /v" /f>NUL
The above commands can be added to the registry A registration message.
Note: When Set OP=%%~dpI in the above path detection command, it is not necessary to add “” after the variable %OP%. As %OP%ACDSEE.EXE above.
You can also use Set OP=%%~dI. Compared with the above, just change ~dpI to ~dI. At this time, the variable will not expand to the current path, but only expand to the current Drive letter. So if you use this, you must add the full path to the program after the variable. For example:
%OP%PROGRAMSTOTALCMDRUNTC.EXE
1, first enter the control panel, and then enter hardware and sound; 2, enter hardware and sound an
There are many reasons why Win8 computers have blue screens. The solution is genera
Win8 starts the interface dynamic tile back to the real-time br
For users who frequently use the command prompt, copying and pasting commands is essential, but some
How does the win8 system view sharing?
Win8 screen keyboard to help you solve the problem
u disk installation win8.1 system tutorial step
Win8.1 can't wake up from sleep solution
Win8 system word document set to read-only file method
The top ten software of Win8 Faner
Practical methods for installing Windows 8 into a separate partition
Win8 how to cancel the boot password
Win8 helps you find the American keyboard
How to check the Windows 8.1 installation key
How to make Win8 one key recovery function
Notebook win7 Ultimate computer can search for wireless signals, but can't connect how to do
Where is the local connection of Win8 system?
NVIDIA discrete graphics card HDMI can not achieve extended display solution under XP system
Microsoft released win10 SDK preview (with download address) built-in Win10 Mobile simulator
Win10 system how to clean up the registry garbage to improve the system speed of
Reasonable setting of Win 7 system common problems to solve
How to find win7 flash cache folder
Two-step speed switching Win 7 screen
Win8 how to set the time search to search for a certain period of time file