Today I encountered a problem when using batch commands to modify the registry! The following is the code I wrote:
@echo off
echo Windows Registry Editor Version 5.00>>ok.reg
echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]>>ok.reg
echo "key"="C:\\WINDOWS\\key.exe">>ok.reg
regedit /s ok.reg
del ok.reg
I don't know if there is any mistake! This is the code in the REG file:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"key"="C:\\WINDOWS\\key.exe"
I don't understand that I can import it when I write other registry entries. But there are a few that I can't import no matter how I compile them. I have modified them many times repeatedly. It should be no problem. I really can't figure it out. Is it that the command is used incorrectly? Please trouble the experts to give me some advice. I'm almost crazy~~~ If possible, add my QQ: 50594677 and talk to me in detail!
@echo off
echo Windows Registry Editor Version 5.00>>ok.reg
echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]>>ok.reg
echo "key"="C:\\WINDOWS\\key.exe">>ok.reg
regedit /s ok.reg
del ok.reg
I don't know if there is any mistake! This is the code in the REG file:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"key"="C:\\WINDOWS\\key.exe"
I don't understand that I can import it when I write other registry entries. But there are a few that I can't import no matter how I compile them. I have modified them many times repeatedly. It should be no problem. I really can't figure it out. Is it that the command is used incorrectly? Please trouble the experts to give me some advice. I'm almost crazy~~~ If possible, add my QQ: 50594677 and talk to me in detail!
