|
|
本帖最后由 DY-WANG 于 2021-6-23 09:31 编辑
命令如下,请教下如何添加系统时间,目前导出来的txt文件没有系统时间显示,求大佬知道- @echo off&setlocal enabledelayedexpansion
- cd /d %~dp0
- for /f "tokens=7* delims=\" %%i in ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall') do (
- echo 摉慜Scan怣懅: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%%~i
- reg export "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%%~i" reg.$ >nul
- for /f "delims=" %%j in ('type reg.$ ^| findstr /i /c:"DisplayName" 2^>nul') do (
- set DN=%%~j
- set DN=!DN:"=!
- set !DN!
- )
- for /f "delims=" %%k in ('type reg.$ ^| findstr /i /c:"InstallLocation" 2^>nul') do (
- set IL=%%~k
- set IL=!IL:"=!
- set IL=!IL:\\=\!
- set !IL!
- )
- if defined DisplayName (echo SoftWareName: !DisplayName!
- echo,)>>applist.txt
- set DisplayName=&set InstallLocation=&del reg.$
- )
- pause
复制代码 |
|