|
|
发表于 2022-2-10 12:37:02
|
显示全部楼层
回复 7# yyz219
我这里没有问题,测试结果如下:
- C:\Users\Administrator\Desktop\test1>type a.txt b.txt test.bat
- a.txt
- @Echo Off
- Title Reg Converter v1.1 & Color 1A
- cd %systemroot%\system32
- call :IsAdmin
- REM ; 由 Total Uninstall 产生
- REM ;【窗口位置:“左300”、“上150”】
- Reg.exe add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MpsSvc\Parameters\PortKeywords\DHCP" /v "Collection" /t REG_BINARY /d "" /f
- Reg.exe add "HKEY_USERS\S-1-5-21-3291519012-2868546545-2290023086-500\Console" /v "WindowPosition" /t REG_DWORD /d "9830700" /f
- Exit
- :IsAdmin
- Reg.exe query "HKU\S-1-5-19\Environment"
- If Not %ERRORLEVEL% EQU 0 (
- Cls & Echo You must have administrator rights to continue ...
- Pause & Exit
- )
- Cls
- goto:eof
- b.txt
- Title Reg Converter v1.1 & Color 1A
- cd %systemroot%\system32
- call :IsAdmin
- REM ; 由 Total Uninstall 产生
- REM ;【窗口位置:“左300”、“上150”】
- :IsAdmin
- Reg.exe query "HKU\S-1-5-19\Environment"
- If Not %ERRORLEVEL% EQU 0 (
- Cls & Echo You must have administrator rights to continue ...
- Pause & Exit
- )
- Cls
- goto:eof
- test.bat
- @echo off
- findstr /v /l /g:b.txt "a.txt"|findstr .
- pause
- C:\Users\Administrator\Desktop\test1>test.bat
- @Echo Off
- Reg.exe add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MpsSvc\Parameters\PortKeywords\DHCP" /v "Collection" /t REG_BINARY /d "" /f
- Reg.exe add "HKEY_USERS\S-1-5-21-3291519012-2868546545-2290023086-500\Console" /v "WindowPosition" /t REG_DWORD /d "9830700" /f
- Exit
- 请按任意键继续. . .
复制代码 |
|