![Photo](http://www.gravatar.com/avatar/4f08f4270caf225a665892c435f78382?s=100&d=http%3A%2F%2Freboot.pro%2Fpublic%2Fstyle_images%2Fmetro%2Fprofile%2Fdefault_large.png)
RegImport command
#1
Posted 19 June 2007 - 09:23 AM
i don't know if this true or not ..
but i think regimport command merging the registry file into the local system registry
#2
Posted 19 June 2007 - 11:28 AM
Thanks!
![:1st:](http://reboot.pro/public/style_emoticons/default/1st.gif)
Just a sugestion, but why not uploading to youtube and then add a direct preview here?
#3
Posted 19 June 2007 - 11:46 AM
here's a script to show the problem
first make sure that there's no such key in you registry
HKEY_CURRENT_USER\New Key #1
then run the script
now check your registry and look at HKEY_CURRENT_USER
* the registry file encoded inside script file
about youtube .. i'm too lazy to do that
![:1st:](http://reboot.pro/public/style_emoticons/default/1st.gif)
#4
Posted 19 June 2007 - 11:51 AM
RegHiveLoad,RegHiveUnload command's ?
#5
Posted 19 June 2007 - 12:12 PM
maybe because i didn't use
RegHiveLoad,RegHiveUnload command's ?
I did not unpack the encoded .reg, but I think you gave yourself the answer
Peter
![:1st:](http://reboot.pro/public/style_emoticons/default/1st.gif)
#6
Posted 19 June 2007 - 12:29 PM
ThanksI did not unpack the encoded .reg, but I think you gave yourself the answer
Peter
#7
Posted 20 June 2007 - 06:19 PM
someone please post a code snippet on how to use RegImport function ..
is this the right way to use it ?
Echo,Merging registry file... Run,%ScriptFile%,RegHiveLoadALL RegImport,"%ScriptDir%\Tese.reg" Run,%ScriptFile%,RegHiveUnLoadALL [RegHiveLoadALL] Echo,Loading registry hive's... RegHiveLoad,"H7Default","%TargetDir%\I386\system32\config\default" RegHiveLoad,"H7Software","%TargetDir%\I386\system32\config\software" RegHiveLoad,"H7System","%TargetDir%\I386\system32\config\system" RegHiveLoad,"H7Sam","%TargetDir%\I386\system32\config\sam" RegHiveLoad,"H7Security","%TargetDir%\I386\system32\config\security" [RegHiveUnLoadALL] Echo,UnLoading registry hive's... RegHiveUnload,"H7Security" RegHiveUnload,"H7Sam" RegHiveUnload,"H7System" RegHiveUnload,"H7Software" RegHiveUnload,"H7Default"
#8
Posted 20 June 2007 - 07:05 PM
![:1st:](http://reboot.pro/public/style_emoticons/default/1st.gif)
#9
Posted 20 June 2007 - 07:27 PM
Sorry .. i didn't know thatThe command you refer works anywhere in the registry, limiting to only work when hives are loaded is not very recommended since we would lose flexibility to apply changes on the host if ever required one day (mobileOS is a good example for an overall registry tweaking using wb)..
![:1st:](http://reboot.pro/public/style_emoticons/default/1st.gif)
..
the previous snippet will it merge the registry file in the target hive's .. is it correct coding?
#10
Posted 20 June 2007 - 09:42 PM
![:1st:](http://reboot.pro/public/style_emoticons/default/1st.gif)
#11
Posted 21 June 2007 - 07:04 AM
For safty purpose maybe wb should deniy access to RegImport and RegWrite unless the RegLoadHive is used first
someone please post a code snippet on how to use RegImport function ..
is this the right way to use it ?Echo,Merging registry file... Run,%ScriptFile%,RegHiveLoadALL RegImport,"%ScriptDir%\Tese.reg" Run,%ScriptFile%,RegHiveUnLoadALL [RegHiveLoadALL] Echo,Loading registry hive's... RegHiveLoad,"H7Default","%TargetDir%\I386\system32\config\default" RegHiveLoad,"H7Software","%TargetDir%\I386\system32\config\software" RegHiveLoad,"H7System","%TargetDir%\I386\system32\config\system" RegHiveLoad,"H7Sam","%TargetDir%\I386\system32\config\sam" RegHiveLoad,"H7Security","%TargetDir%\I386\system32\config\security" [RegHiveUnLoadALL] Echo,UnLoading registry hive's... RegHiveUnload,"H7Security" RegHiveUnload,"H7Sam" RegHiveUnload,"H7System" RegHiveUnload,"H7Software" RegHiveUnload,"H7Default"
Your test .reg really writes into the local registry:
[HKEY_CURRENT_USER\New Key #1]
"New Value #1"=""
"New Value #2"=hex:
It should be:
or similar, in order to write into your hive.[HKLM\H7System\New Key #1]
"New Value #1"=""
"New Value #2"=hex:
BTW: I usually open only one hive and close if it is not more used.
Then the next hive ...
Sam and Security until to today are never used ...
Peter
#12
Posted 21 June 2007 - 12:58 PM
BTW: I usually open only one hive and close if it is not more used.
Then the next hive ...
Sam and Security until to today are never used ...
Peter
yes it's better but in order to use this style i'll have to make multi registry file's .. one for each hive
#13
Posted 21 June 2007 - 01:08 PM
And that could be done like:yes it's better but in order to use this style i'll have to make multi registry file's .. one for each hive
RegHiveLoad,"H7Default","%TargetDir%\I386\system32\config\default" RegImport,"%ScriptDir%\H7Default.reg" RegHiveUnLoad,"H7Default" RegHiveLoad,"H7Software","%TargetDir%\I386\system32\config\software" RegImport,"%ScriptDir%\H7Software.reg" RegHiveUnLoad,"H7Software" RegHiveLoad,"H7System","%TargetDir%\I386\system32\config\system" RegImport,"%ScriptDir%\H7System.reg" RegHiveUnLoad,"H7System" RegHiveLoad,"H7Setup","%TargetDir%\I386\system32\setupreg.hiv" RegImport,"%ScriptDir%\H7Setup.reg" RegHiveUnLoad,"H7Setup"
And inside the H7???.reg there is
[HKLM\H7???\MyKey\MySubKey ...
Peter
#14
Posted 21 June 2007 - 03:13 PM
#15
Posted 21 June 2007 - 03:18 PM
Please post the script and the *.reg file!program updated but i get error message
Peter
#16
Posted 21 June 2007 - 03:33 PM
#17
Posted 21 June 2007 - 03:42 PM
Here's the script with generated registry file's encoded inside it plus the file's exported from regedit
You see me a little bit confused!
Why do you want to write into local registry?
Do you want to change some properties of your local FTP program?
Maybe you should explain what the script / *.reg-s are intended to do.
Peter
#18
Posted 21 June 2007 - 03:58 PM
second the registry file's is just for test purpose i just export it randomly from the regedit
#19
Posted 21 June 2007 - 04:14 PM
First the U.reg and M.reg isn't part of the script .. i just included so you can compare the incuded registry file's and the original one if you want to do that..
second the registry file's is just for test purpose i just export it randomly from the regedit
Change
[HKLM\H7Software\HKEY_LOCAL_MACHINE\SOFTWARE\Ipswitch\WS_FTP]To
[HKLM\H7Software\SOFTWARE\Ipswitch\WS_FTP](and everything else accordingly)
and try again.
BTW: How works 3 times [Process]?
Peter
#20
Posted 21 June 2007 - 04:30 PM
Change
[HKLM\H7Software\HKEY_LOCAL_MACHINE\SOFTWARE\Ipswitch\WS_FTP]To[HKLM\H7Software\SOFTWARE\Ipswitch\WS_FTP](and everything else accordingly)
and try again.
![:thumbup:](http://reboot.pro/public/style_emoticons/default/thumbup.gif)
![:1st:](http://reboot.pro/public/style_emoticons/default/1st.gif)
i thought it's allowed to use Multiple section name's ?BTW: How works 3 times [Process]?
#21
Posted 21 June 2007 - 04:33 PM
I do not know.i thought it's allowed to use Multiple section name's ?
@Nuno?
Peter
#22
Posted 21 June 2007 - 04:34 PM
Does it mean that it is ok now?
sorry for that .. Thanks
Peter
#23
Posted 21 June 2007 - 04:39 PM
it mean's thank you for warning me about this bug
Change
[HKLM\H7Software\HKEY_LOCAL_MACHINE\SOFTWARE\Ipswitch\WS_FTP]To[HKLM\H7Software\SOFTWARE\Ipswitch\WS_FTP](and everything else accordingly)
and try again.
i fixed it and then tried again but same error message ..
#24
Posted 21 June 2007 - 04:47 PM
No ..
it mean's thank you for warning me about this bug
i fixed it and then tried again but same error message ..
Then please post the actual script and the long.
To make future requests of mine unnecessary:
As long as the issue is not solved:
On every new report please add script and log.
Peter
#25
Posted 21 June 2007 - 05:03 PM
This is somewhat supported to some extent on older wb versions, but I'm removing to optimize overall speed and avoid scanning the whole script to the end of file.
![:1st:](http://reboot.pro/public/style_emoticons/default/1st.gif)
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users