-2
I created a bat to add a file content to a record value, but I can’t get the contents of the play variable in the value.
This is my . BAT
@echo off
setlocal EnableDelayedExpansion
If exist "MD5arquivo.TXT" del MD5arquivo.TXT
set /a cont=0
for /f "delims= skip=4" %%a in (C:\commerce\MD5-PAF-ECF-LINX.TXT) do (
echo %%a>> MD5arquivo.TXT
set /p var=<MD5arquivo.TXT
set /a cont=!cont!+1
if "!cont!"=="2" goto novo
pause
)
:novo
reg add HKLM\Software\RegisteredApplications /v "MD5-PAF-ECF-LINX.TXT" /d %var%
when playing the contents of the variable %var% in the record is shown the error below
When using the echo command to display the contents of my variable, I realize that its content is what I need, as returned below
How can I fix this?
Thanks for the reply, the contents of my archive are this: ; Slavasoft Optimizing Checksum Utility - fsum 2.52.00337 <www.slavasoft.com> ; Generated on 06/22/21 at 16:49:36 d6bd331a7ae1570912bc45228580fc6f *EXECUTABLES-LINX.TXT This logic is assembled to take the data of the last line, which is the data I need to play in my record, this file is constantly modified, but the result always comes in the last line, so use that way. I’ll try using your method.
– Daniel
@Daniel Edit your question and add row by row to your file
– It Wasn't Me
If you have the file, pq do not use certuil.exe (already has Windows) and grab the hash direct. No additional text file...
– It Wasn't Me