当前位置:网站首页>使用Batch读取注册表
使用Batch读取注册表
2022-06-11 05:38:00 【zhmhbest】
ReadRegistry
@ECHO OFF
REM ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
REM ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
CALL :ReadFolders "Desktop"
ECHO 桌面路径:%return_value%
CALL :ReadUninstall "Google Chrome"
ECHO 谷歌浏览器:%return_value%
PAUSE
REM ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
REM ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
@GOTO :EOF
:ReadUninstall
@IF "AMD64" EQU "%PROCESSOR_ARCHITECTURE%" @(
CALL :ReadRegistry "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%~1" UninstallString
) ELSE @(
CALL :ReadRegistry "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%~1" UninstallString
)
@GOTO :EOF
REM ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
:ReadFolders
@CALL :ReadRegistry "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "%~1"
@GOTO :EOF
REM ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
:ReadRegistry
@FOR /F "usebackq skip=2 delims=" %%i IN (`REG QUERY "%~1" /v "%~2"`) DO @(
@CALL :__GetPart %%i
)
@GOTO :EOF
:__GetPart
@SET return_value=%~3 %~4 %~5 %~6 %~7 %~8 %~9
@CALL :__TrimR
@GOTO :EOF
:__TrimR
@IF "%return_value:~-1%"==" " @(
SET "return_value=%return_value:~0,-1%"
GOTO :__TrimR
)
@GOTO :EOF
REM ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
边栏推荐
- 初步了解多任务学习
- Swap numbers (no temporary variables)
- 深度学习分布式训练
- 袋鼠雲數棧基於CBO在Spark SQL優化上的探索
- Opencv learning path (2-2) -- Deep parsing namedwindow function
- Combination sum Ⅳ -- leetcode exercise
- Feynman learning method
- Stone game -- leetcode practice
- JS promise, async, await simple notes
- Section I: classification and classification of urban roads
猜你喜欢

Error:Execution failed for task ':app:buildNative'. & gt; A problem occurred'x/x/x/'NDK build' error resolution

微信自定义组件---样式--插槽

In the future, how long will robots or AI have human creativity?

MySQL string to array, merge result set, and convert to array

BERT知识蒸馏

Number of atoms (easy to understand)

袋鼠云数栈基于CBO在Spark SQL优化上的探索

袋鼠雲數棧基於CBO在Spark SQL優化上的探索

Exploration of kangaroo cloud data stack on spark SQL optimization based on CBO

Analyze while doing experiments -ndk article -jni uses registernatives for explicit method registration
随机推荐
初步了解多任务学习
深度学习分布式训练
20多种云协作功能,3分钟聊透企业的数据安全经
Get the third-party interface
Bit operation marks multiple switches with one parameter
QT Road (2) -- HelloWorld
JS promise, async, await simple notes
C (I) C basic grammar all in one
Preliminary understanding of DFS and BFS
自定义View基础之Layout
Flask develops and implements the like comment module of the online question and answer system
NDK learning notes (x) POSIX socket for connectionless communication
Convert result set of SQL to set
SQLite one line SQL implementation updates if there is one, inserts if there is none, multiple conditions, complex conditions
微信小程序,购买商品属性自动换行,固定div个数,超出部分自动换行
lower_ Personal understanding of bound function
Combing route - Compaction Technology
Start the project using the locally configured gradle
ELK日志系统实战(六):技术选型之vector与filebeat对比
Multithreading tutorial (XXV) atomic array