Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - merge *.reg into registry by vbscript?

Reply
 
Old 02-24-2009   #1 (permalink)
LJB


 
 

merge *.reg into registry by vbscript?

I need to merge a reg file into my registry before starting another Windows
application. Can this be done with vbscript? I know how to start my
application I just need a tip on how to merge the registry. These Oracle
connecting apps need conflicting settings which I need to switch before
running them. Perhaps it would be better to merge both settings files to
temporary branches and only rename the top level key when needed. Any good
ideas?

thanks
LJB



My System SpecsSystem Spec
Old 02-24-2009   #2 (permalink)
Pegasus \(MVP\)


 
 

Re: merge *.reg into registry by vbscript?


"LJB" <postmaster@[127.0.0.1]> wrote in message
news:eX5eghplJHA.3760@xxxxxx
Quote:

>I need to merge a reg file into my registry before starting another Windows
>application. Can this be done with vbscript? I know how to start my
>application I just need a tip on how to merge the registry. These Oracle
>connecting apps need conflicting settings which I need to switch before
>running them. Perhaps it would be better to merge both settings files to
>temporary branches and only rename the top level key when needed. Any good
>ideas?
>
> thanks
> LJB
By far the simplest method would be to launch Oracle with a batch file like
this one:
@echo off
regedit /s c:\LJB.reg
start /b "Oracle" "c:\Program Files\Oracle\...exe"


My System SpecsSystem Spec
Old 02-24-2009   #3 (permalink)
LJB


 
 

Re: merge *.reg into registry by vbscript?


"Pegasus (MVP)" <I.can@xxxxxx> wrote in message
news:eYuGAwplJHA.4028@xxxxxx
Quote:

>
> "LJB" <postmaster@[127.0.0.1]> wrote in message
> news:eX5eghplJHA.3760@xxxxxx
Quote:

>>I need to merge a reg file into my registry before starting another
>>Windows application. Can this be done with vbscript? I know how to start
>>my application I just need a tip on how to merge the registry. These
>>Oracle connecting apps need conflicting settings which I need to switch
>>before running them. Perhaps it would be better to merge both settings
>>files to temporary branches and only rename the top level key when needed.
>>Any good ideas?
>>
>> thanks
>> LJB
>
> By far the simplest method would be to launch Oracle with a batch file
> like this one:
> @echo off
> regedit /s c:\LJB.reg
> start /b "Oracle" "c:\Program Files\Oracle\...exe"
>
I'm beginning to think so too. I've tried a number of variations of
WshShell.Run such as "regedt32 /s C:\ljb.reg" and "regedit /s C:\ljb.reg"
without any luck. I'm running XP so I think it should be regedt32 but I'm
wondering if security is preventing vbscript from changing the registry.

thanks
LJB


My System SpecsSystem Spec
Old 02-24-2009   #4 (permalink)
Pegasus \(MVP\)


 
 

Re: merge *.reg into registry by vbscript?


"LJB" <postmaster@[127.0.0.1]> wrote in message
news:eyXkQ3plJHA.1340@xxxxxx
Quote:

>
> "Pegasus (MVP)" <I.can@xxxxxx> wrote in message
> news:eYuGAwplJHA.4028@xxxxxx
Quote:

>>
>> "LJB" <postmaster@[127.0.0.1]> wrote in message
>> news:eX5eghplJHA.3760@xxxxxx
Quote:

>>>I need to merge a reg file into my registry before starting another
>>>Windows application. Can this be done with vbscript? I know how to start
>>>my application I just need a tip on how to merge the registry. These
>>>Oracle connecting apps need conflicting settings which I need to switch
>>>before running them. Perhaps it would be better to merge both settings
>>>files to temporary branches and only rename the top level key when
>>>needed. Any good ideas?
>>>
>>> thanks
>>> LJB
>>
>> By far the simplest method would be to launch Oracle with a batch file
>> like this one:
>> @echo off
>> regedit /s c:\LJB.reg
>> start /b "Oracle" "c:\Program Files\Oracle\...exe"
>>
>
> I'm beginning to think so too. I've tried a number of variations of
> WshShell.Run such as "regedt32 /s C:\ljb.reg" and "regedit /s C:\ljb.reg"
> without any luck. I'm running XP so I think it should be regedt32 but I'm
> wondering if security is preventing vbscript from changing the registry.
>
> thanks
> LJB
No, regedt32 was a variant of regedit.exe under Windows 2000. Under WinXP
it's always regedit.exe.

You can, of course, use a VB Script file to write data into the registry.
It's more involved than the batch file solution but it can be done. You
mention that you were unsuccessful for reasons unknown - let's have a look
at your script and the error message you see!


My System SpecsSystem Spec
Old 02-24-2009   #5 (permalink)
LJB


 
 

Re: merge *.reg into registry by vbscript?


"Pegasus (MVP)" <I.can@xxxxxx> wrote in message
news:uqk719plJHA.3760@xxxxxx
Quote:

>
> "LJB" <postmaster@[127.0.0.1]> wrote in message
> news:eyXkQ3plJHA.1340@xxxxxx
Quote:

>>
>> "Pegasus (MVP)" <I.can@xxxxxx> wrote in message
>> news:eYuGAwplJHA.4028@xxxxxx
Quote:

>>>
>>> "LJB" <postmaster@[127.0.0.1]> wrote in message
>>> news:eX5eghplJHA.3760@xxxxxx
>>>>I need to merge a reg file into my registry before starting another
>>>>Windows application. Can this be done with vbscript? I know how to start
>>>>my application I just need a tip on how to merge the registry. These
>>>>Oracle connecting apps need conflicting settings which I need to switch
>>>>before running them. Perhaps it would be better to merge both settings
>>>>files to temporary branches and only rename the top level key when
>>>>needed. Any good ideas?
>>>>
>>>> thanks
>>>> LJB
>>>
>>> By far the simplest method would be to launch Oracle with a batch file
>>> like this one:
>>> @echo off
>>> regedit /s c:\LJB.reg
>>> start /b "Oracle" "c:\Program Files\Oracle\...exe"
>>>
>>
>> I'm beginning to think so too. I've tried a number of variations of
>> WshShell.Run such as "regedt32 /s C:\ljb.reg" and "regedit /s C:\ljb.reg"
>> without any luck. I'm running XP so I think it should be regedt32 but I'm
>> wondering if security is preventing vbscript from changing the registry.
>>
>> thanks
>> LJB
>
> No, regedt32 was a variant of regedit.exe under Windows 2000. Under WinXP
> it's always regedit.exe.
>
> You can, of course, use a VB Script file to write data into the registry.
> It's more involved than the batch file solution but it can be done. You
> mention that you were unsuccessful for reasons unknown - let's have a look
> at your script and the error message you see!
>
It was my error. The path isn't exactly C:\ljb.reg but is a long path with
some spaces in it. Its working now.

thanks


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
VBScript to traverse all Registry keys VB Script
VBScript to traverse all Registry keys VB Script
Re: remote registry merge - plase help VB Script
How to rename a registry key using vbscript? VB Script
vbscript registry exist then...... VB Script


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46