A batch file that will not prompt for an action

G

Guest

Hi All

I would like to create a batch file that does not prompt me to choose an option. I have exported a registry DWORD value which I would like to add to all the workstations; however, when you click on the *.reg file it prompts for an option of "yes" or "no" to add the value to the registry. I have created a batch file to run from the server to install at startup on all the workstations, but I do not know what switch if there is one to use in the batch file to automatically choose yes

C:\ Start updatetopleveldnszones.re

This opens the file, which asks if I would like to add this value to the registry "yes" or "No". I would like to know what to add to the above to make the program automatically choose "yes" without end user interaction. Thanks

Best regards

Samantha
 
M

Mark V

In microsoft.public.win2000.cmdprompt.admin =?Utf-8?B?U2FtYW50aGE=?=
wrote:
Hi All,

I would like to create a batch file that does not prompt me to
choose an option. I have exported a registry DWORD value which I
would like to add to all the workstations; however, when you click
on the *.reg file it prompts for an option of "yes" or "no" to add
the value to the registry. I have created a batch file to run
from the server to install at startup on all the workstations, but
I do not know what switch if there is one to use in the batch file
to automatically choose yes.

C:\ Start updatetopleveldnszones.reg

This opens the file, which asks if I would like to add this value
to the registry "yes" or "No". I would like to know what to add
to the above to make the program automatically choose "yes"
without end user interaction. Thanks.

regedit.exe /S <path>\updatetopleveldnszones.reg
"/S" for silent.

You can use a START but likely don't need to.
regedit.exe should set an errorlevel. You should test that in your
environment if you need to.
 
M

Mark V

In microsoft.public.win2000.cmdprompt.admin =?Utf-8?B?U2FtYW50aGE=?=
wrote:
Hi Mark,

I tried it "C:\ /S Start updatetopleveldnszones.reg" and it did
not work. What should I do next?
regedit.exe /S <path>\updatetopleveldnszones.reg


explicitly execute the regedit.exe registry editor to import (merge)
the .REG files and do it silently.
regedit.exe /S <path>\updatetopleveldnszones.reg

Where "<path>"= a fully qualified path to the .REG file if not in the
(presume) netlogon location.
 
M

Michael Bednarek

Hi Mark,

I tried it "C:\ /S Start updatetopleveldnszones.reg" and it did not work. What should I do next?

I suggest you do what Mark suggested. To repeat:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top