?
Solved

insert a regedit value with a script whitout confirm

Posted on 2003-03-07
4
Medium Priority
?
922 Views
Last Modified: 2012-05-04
Hi all,
I'd like to know if ther is a way to insert a reg value (a Key) with a batch script whitout the have the confirmation pop-up.
At the moment a hava a script like that:
one.bat -> contains
                    c:\two.reg
                    other commands...

two.reg -> contains
                   regedit
                   [HKEY_CLASSES_ROOT\.001]
                   @="001file"

the problem that when I execute the one.bat script at the end a confirmation window pops up.

Is it possible to avoid it in order to let the script continue?

Thanks
0
Comment
Question by:leon_73
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 10

Expert Comment

by:makerp
ID: 8087216
use windows scripting host.

Set WshShell = Wscript.CreateObject("Wscript.Shell")

WshShell.RegWrite "HKCU\ScriptEngine\Value", "Some string value"
WshShell.RegWrite "HKCU\ScriptEngine\Key\", 1 "REG_DWORD"

look it up on MSDN.

if you dont want to re-write in vbs then simply call a small vbs that just does this from your batch file etc
0
 
LVL 7

Accepted Solution

by:
YarnoSG earned 150 total points
ID: 8087808
alternately you can call regedit.exe directly:

i.e.:

REGEDIT.EXE C:\Two.REG /s

will import two.reg without a popup confirmation.

HTH

-Steven Yarnot
http://yarnosg.home.insightbb.com
0
 
LVL 1

Expert Comment

by:klaszlo
ID: 8088179
You can use Kixtart too.
0
 

Author Comment

by:leon_73
ID: 8090808
the only thing is
regedit /s two.reg

;-)

anyway thanks a lot!
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question