Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: REGIDIT > C:/reg.reg  (Read 5039 times)

0 Members and 1 Guest are viewing this topic.

fruitcake1

  • Guest
REGIDIT > C:/reg.reg
« on: July 14, 2005, 09:45:02 AM »
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

Thanx

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: REGIDIT > C:/reg.reg
« Reply #1 on: July 14, 2005, 10:50:07 AM »
Save 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.

8)
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein

fruitcake1

  • Guest
Re: REGIDIT > C:/reg.reg
« Reply #2 on: July 14, 2005, 11:12:04 AM »
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??
« Last Edit: July 14, 2005, 11:13:06 AM by fruitcake1 »

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: REGIDIT > C:/reg.reg
« Reply #3 on: July 14, 2005, 11:40:36 AM »
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.

8)
« Last Edit: July 14, 2005, 11:53:36 AM by Sidewinder »
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein

fruitcake1

  • Guest
Re: REGIDIT > C:/reg.reg
« Reply #4 on: July 14, 2005, 12:13:13 PM »
Never mind it works. I put @ in front of ECHO.

fruitcake1

  • Guest
Re: REGIDIT > C:/reg.reg
« Reply #5 on: July 14, 2005, 12:13:52 PM »
Never mind it works. I put @ in front of ECHO.

E.G.
Code: [Select]
@ECHO

jen140

  • Guest
Re: REGIDIT > C:/reg.reg
« Reply #6 on: November 06, 2005, 05:53:54 AM »
And is there any way to import from .reg using .bat file without user chosing y/n ?

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: REGIDIT > C:/reg.reg
« Reply #7 on: November 06, 2005, 08:25:52 AM »
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.

8)
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein