Cannot get REG ADD to work in batch file

Following some things I found online I came up with the following code:

REF ADD HKLM\SYSTEM\ControlSet001\Control /v WaitToKillServiceTimeout /t reg_sz /d 200

Which when run under CMD.EXE (or the command prompt), it works fine.  When I place it by itself in a *.bat file and double click on it, a command window comes up and just keep repeating the command over and over again, but never actually executes it.  What am I missing here?

Also, I know I could do this with a *.reg file, but I need a batch file version for internal reasons.  Any help is greatly appreciated!!
parkridgelibraryAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hlarseCommented:
well, i hope the "ref" is just a typo, not a copy/paste.

if the key already exists, try
REG ADD HKLM\SYSTEM\ControlSet001\Control /v WaitToKillServiceTimeout /t REG_SZ /d 200 /f
to force an overwrite.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
parkridgelibraryAuthor Commented:
Yes, it was a typo and that worked prefectly!!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Batch

From novice to tech pro — start learning today.