Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the methods of operating bat and registry

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains "bat and registry operation methods," interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let Xiaobian take you to learn "bat and registry operation methods have what" bar!

bat(batch processing) operation registry method, I know there should be two kinds

1, combined with reg.exe to achieve reading and writing registry

2, use bat output file, and then regedit /s 1.reg format to achieve output vbs and so on are this

echo cmd.exe /k dir c: > c:\windows\system32\1.bat

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "test" /d "c:\windows\system32\1.bat" /f

command prompt

reg /?

Look at the help.

I'll help you stick it up about reg add. See for yourself.

REG ADD KeyName [/v ValueName | /ve] [/t Type] [/s Separator] [/d Data] [/f]

KeyName [\\Machine\]FullKey

Machine name of remote machine-Ignore default to current machine.

Only HKLM and HKU are available on remote machines.

FullKey ROOTKEY\SubKey

ROOTKEY [ HKLM | HKCU | HKCR | HKU | HKCC ]

The full name of the registry entry under ROOTKEY selected by SubKey

/v Name of value to add under selected item

/ve Add a blank value name to a registry key

/t RegKey Data Type

[ REG_SZ | REG_MULTI_SZ | REG_DWORD_BIG_ENDIAN |

REG_DWORD | REG_BINARY | REG_DWORD_LITTLE_ENDIAN |

REG_NONE | REG_EXPAND_SZ ]

If omitted, use REG_SZ

/s specifies one in the REG_MULTI_SZ data string

Character used as separator

If omitted, use '\0' as separator

/d Data to assign to registry ValueName added

/f Force overwrite existing registry key without prompting

For example:

REG ADD \\ABC\HKLM\Software\MyCo

Add a registry key HKLM\Software\MyCo on remote machine ABC

REG ADD HKLM\Software\MyCo /v Data /t REG_BINARY /d fe340ead

Add a value (name: Data, type: REG_BINARY, data: fe340ead)

REG ADD HKLM\Software\MyCo /v MRU /t REG_MULTI_SZ /d fax\0mail

Add a value (Name: MRU, Type: REG_MUTLI_SZ, Data: fax\0mail\0\0)

REG ADD HKLM\Software\MyCo /v Path /t REG_EXPAND_SZ /d %%systemroot%%

Add a value (name: Path, type: REG_EXPAND_SZ, data: %systemroot%)

Note: Use double percent sign ( %% ) in extended strings

At this point, I believe that we have a deeper understanding of "bat and registry operation methods," may wish to actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report