Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

insert a regedit value with a script whitout confirm

Posted on 2003-03-07
4
Medium Priority
?
924 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
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
Use this step by step method when setting up QuickBooks Online. They will allow you to explore the various features of the advanced settings available to you.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

572 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