1.

Solve : REGIDIT > C:/reg.reg?

Answer»

I need to know how to save the following code in C:/reg.reg automatically when I open it as a bat file:
Code: [SELECT]ECHO off
ECHO REGEDIT4 > c:\reg.reg
ECHO. >> c:\reg.reg
ECHO [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main] >> c:\reg.reg
ECHO "Start Page"="http://www.weatheroffice.ec.gc.ca/city/pages/ab-52_metric_e.html" >> c:\reg.reg
ECHO.
exit
ThanxSave your file as reg.bat. Run it, which will create the reg.reg file, then double click the reg.reg file. The reg.reg file will ACTUALLY update the registry.

Internet Tools could just as well be used and you realize if your browser has been hijacked that this is only a temporary fix.

It doesn't seem to WORK?!!?? when I double-click on reg.bat it comes up as:
Code: [Select]c:\WINDOWS>ECHO off
And on the top of the window it says "finished - reg"

For some reason the rest of the file doesn't show??Double clicking on a batch file that turns echo off does just that. There is no mimic of statements back to the console. Plus the fact that all the output was redirected to reg.reg.

Did the reg.reg file get created? If so, then your batch file ran successfully.

Never mind it works. I put @ in front of ECHO.Never mind it works. I put @ in front of ECHO.

E.G.
Code: [Select]@ECHO
And is there any way to import from .reg using .bat file without user chosing y/n ?Jen, tagging on to an old post (especially one from a poster who has since been banned from the forums) is not a good way to get your question noticed.

When working with the registry, I don't suggest using batch files. Use REGEDIT interactively, create a backup copy before making any changes, and keep your wits about you.

Many AV and malware scanners create .reg files so you can back out any changes they MADE. Creating your own can create unforeseeable (read: FATAL) problems.



Discussion

No Comment Found