![]() |
#81 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Added: registry::Open options
"/NS=[name]" - sensitive search for a part of name "/NI=[name]" - insensitive search for a part of name "Registry" plugin v3.0 |
![]() |
![]() |
![]() |
#82 |
Junior Member
Join Date: May 2006
Posts: 4
|
Multiple key Regsearch
Instructor,
First thanks for the help, I am sorry it took so long to get back to you. Second, I am having the same problem, What I need is for my search algorithm to search the registry for a specific keyword. If found save the key to a reg file, then from that point, the regkey it just wrote, continue to search the rest of the registry for that keyword. If another is found then save, start from that point and continue, and so on until it hits the end of the registry. Here is my search function: code: After the 'StrCpy $RC "1"' line it should jump back to the registry::find line and continue to search the registry for the next key. What it is doing it going back to the beginning of the opened root key and starting again, So it hits the already saved key and appends it to the regfile. Basically it creates a loop that creates a file that will keep writing the same info over and over again, until I kill it in the task manager. Is it possible for me to do this with your plugin? If so, how should I change the code above to make it work? thanks for all your help with this. Deuce |
![]() |
![]() |
![]() |
#83 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
You use relative jumps through macros.
|
![]() |
![]() |
![]() |
#84 |
Junior Member
Join Date: May 2006
Posts: 4
|
How would I go about coding something like that?
Right now, That is my macro. I call that macro from within my main prog script. It is my regsearch function pretty much. |
![]() |
![]() |
![]() |
#85 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Something like this:
code: |
![]() |
![]() |
![]() |
#86 |
Junior Member
Join Date: May 2006
Posts: 4
|
Registry.dll left in Temp
I noticed while using your plugin in some of my code, that after the registry plugin is copied to the temp directory, it still is there even after the program is shutdown.
My point is, after running the program ten times say, I have ten temp folders all containing the registry.dll file. They add up after a time. Is this something that can be fixed? Thanks, Deuce. PS. thanks for the help on the above function, I am still trying to find the time to try it out. |
![]() |
![]() |
![]() |
#87 |
Senior Member
Join Date: Jul 2004
Location: Switzerland
Posts: 223
|
Hi Deuce199!
It seems that you don't execute the 'unload'-function by the time you've finished using the plugin. Have a look at the excellent readme.txt for further information. code: Cheers Bruno |
![]() |
![]() |
![]() |
#88 |
Junior Member
Join Date: Dec 2006
Posts: 2
|
![]()
Both Registry.dll and PPC-Registry.dll were copied to NSIS plugin directory, but when I try to use them in my nsi file I get compilation errors:
When I call either Registry::Open or PC-Registry::CeRapiInit both generate an invalid command error. I am able to use other plugins, such as nsislog.dll, so I don't undesrtand what's different with Registry.dll and PPC-Registry.dll. Does anybody know what I am missing ? Do I need to include anything in my nsi code to use these plugins? |
![]() |
![]() |
![]() |
#89 |
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
You have to:[list=1][*]Get the DLLs moved to the plugins folder (which sounds like you have)[*]Move REGISTRY.NSH to the include folder[*]Add !Include 'REGISTRY.NSH' to the top of your script.[*]Make your calls using the built-in defines rather than regular plugin calls. (Example: Use ${registry::Open}, not Registry::Open)[/list=1]
See the README.TXT file included with the plugin along with the included sample script. ![]() |
![]() |
![]() |
![]() |
#90 |
Junior Member
Join Date: Dec 2006
Posts: 2
|
Thank you very much ! It's working now !
|
![]() |
![]() |
![]() |
#91 |
Junior Member
Join Date: Feb 2007
Posts: 3
|
Cant access fully to x64-Registry
Hi,
whe i create a new Key in HKLM\Software with Regedit.exe than i cant read this key with ${registry::Read} (returns empty String) or ${registry::Exist} (returns -1). Also ${registry::Find} doesnt enumerate this new Key. This only happens on Windows XP x64 or Vista x64. What can i do? |
![]() |
![]() |
![]() |
#92 |
Senior Member
Join Date: Jan 2007
Posts: 125
|
seems like i have same issue. cause under 64 bit windows, the rigstry keys go to win6432node ....
|
![]() |
![]() |
![]() |
#93 |
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
|
![]() |
![]() |
![]() |
#94 |
Junior Member
Join Date: May 2007
Posts: 2
|
![]()
Hi all.
I've been using this plugin to help create portable applications (most portable apps use this plugin). A problem is that if you have many and/or very large registry keys, not all of the data is inserted into the registry before the application starts. I modified the source code myself to fix this problem by adding a call to WaitForSingleObject on the handle returned by CreateProcess in the _RestoreKey function thus: code: but it crashed my compiler (msvc6) when i tried to build it. If anyone wouldn't mind rebuilding this project with that modification, I'd really appreciate it. Thanks very much, Ehtyar. |
![]() |
![]() |
![]() |
#95 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Ehtyar
|
![]() |
![]() |
![]() |
#96 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Changed: small optimization.
"Registry" plugin v3.1 |
![]() |
![]() |
![]() |
#97 |
Junior Member
Join Date: May 2007
Posts: 2
|
Oh thank you so much instructor, it works perfectly. I'm sorry i could not accomplish that without bugging you, i guess i need to check for updates :S.
Thanks again, Ehtyar. |
![]() |
![]() |
![]() |
#98 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Fixed: possible memory overflow (changed lstrcpy to lstrcpyn).
"Registry" plugin v3.2 |
![]() |
![]() |
![]() |
#99 |
Junior Member
Join Date: Sep 2002
Posts: 39
|
I was curious which functions in your plugin should be followed by a Sleep command, and for how long? I've noticed that some like RestoreKey perform more reliably with a Sleep 50 or 100.
So basically, which functions execute and continue on the script immediately (without waiting for the actual registry operation to finish), and which wait for the registry operation to finish before moving on in the script? Great plugin, thanks! |
![]() |
![]() |
![]() |
#100 |
Junior Member
Join Date: Sep 2002
Posts: 39
|
I found a bug in v3.2 (big one unfortunately).
The ${registry::SaveKey} function is saving keys in HKCU as [HKCU\<whatever>] in the REG file. Obviously this will not import back into the registry. I checked back to v3.1 and this bug was not present. HKLM seems to work fine and is expanded to HKEY_LOCAL_MACHINE. I'm not sure if other short names are affected or not. |
![]() |
![]() |
![]() |
#101 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Fixed: registry::SaveKey short root name didn't translated to a long name.
"Registry" plugin v3.3 |
![]() |
![]() |
![]() |
#102 |
Junior Member
Join Date: Sep 2002
Posts: 39
|
Thanks for the quick update!
Any comment on my post above about using Sleep times with your plugin? |
![]() |
![]() |
![]() |
#103 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
wraithdu
No comments. I don't understand your post. |
![]() |
![]() |
![]() |
#104 |
Junior Member
Join Date: Sep 2002
Posts: 39
|
Sorry, I'll try to be more clear.
I use NSIS to make portable app launchers. I've been in the habit of placing a 'Sleep 50' or 'Sleep 100' command after a call to your registry plugin to allow the the operation to finish before moving on in my script. The best example is what is described above by Ehtyr. It seems the RestoreKey function does not wait for the registry information to be fully imported before moving on in the script and launching the application. He modified the DLL to fix this problem. I have just added some Sleep time. So my question is, what other functions in your plugin behave in the same way (ie do not wait for the registry operation to finish)? Should I then keep adding the Sleep commands to compensate for this? And would it be possible to modify all the registry commands as Ehtyr did? I hope that makes more sense. |
![]() |
![]() |
![]() |
#105 | |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Quote:
To import all registry information before continue, you could use the following code: code: |
|
![]() |
![]() |
![]() |
#106 |
Junior Member
Join Date: Aug 2007
Posts: 12
|
So, just confirming, all registry operations except restore wait for the operation to complete before continuing? If so, this is awesome, I get to cut a ton of sleeps out of my scripts!
Also, thank you so much for this plugin Instructor, it's wonderful. QM |
![]() |
![]() |
![]() |
#107 | |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Quote:
|
|
![]() |
![]() |
![]() |
#108 |
Junior Member
Join Date: Sep 2003
Location: FRANCE
Posts: 34
|
just a question : if I want to find a value in a specified root , after the method find, i have to compare the $var2 with the value I want to find ? is it exact...
i want to use your "wonderful" source code given above to test... I did this kind of algorith in my installer to check the presence of key in the registry base but it was long; with this one it is "SUPER"..... JCD |
![]() |
![]() |
![]() |
#109 |
Junior Member
Join Date: Sep 2003
Location: FRANCE
Posts: 34
|
is it possible to have a error code return in $4 for the method find... if error so , doesn't find if not so seems to be good....
thks JCD |
![]() |
![]() |
![]() |
#110 |
Junior Member
Join Date: Sep 2003
Location: FRANCE
Posts: 34
|
an other question :
in the method you described above, can we use the method read and ifkeyexist before the method close andunload ? I try and it doesn't work.... i search a value in a root by using the find method and just after i wanted to use the values returned by the find method to read a value in a fullpath call ${registry::Open}.... /B=0 $0 call : ${registry::Find} "$0" $1 $2 $3 $4 ...ok i found the value.. call {registry::read} "$1" "$2" $R0 $R1.. call ${registry::close} but read doesn't work... can you help me.. JCD |
![]() |
![]() |
![]() |
#111 |
Member
Join Date: May 2007
Posts: 98
|
How do you delete the HKLM\SYSTEM\WPA\key- (WXP-Pro)
Hi
How do you delete the HKLM\SYSTEM\WPA\key- (WXP-Pro) I can one a make program with Nsis What do you use or do to delete these extra keys HKEY_LOCAL_MACHINE\SYSTEM\WPA\Key-XXXXXXXXXXXXXXXXXXXXX Doing it the normal right click and delete it kicks out and says you can't do that BEEP )(&(^^%$%$### Don't need the bloody extra ones I even tried to change the permission still no go!!!!!! plz example show me |
![]() |
![]() |
![]() |
#112 |
Member
Join Date: May 2007
Posts: 98
|
plz example show me
|
![]() |
![]() |
![]() |
#113 |
Member
Join Date: May 2007
Posts: 98
|
Can you Help!?
|
![]() |
![]() |
![]() |
#114 |
Member
Join Date: May 2007
Posts: 98
|
Hi
How do you delete the HKLM\SYSTEM\WPA\key- (WXP-Pro) I can one a make program with Nsis What do you use or do to delete these extra keys HKEY_LOCAL_MACHINE\SYSTEM\WPA\Key-XXXXXXXXXXXXXXXXXXXXX Doing it the normal right click and delete it kicks out and says you can't do that BEEP )(&(^^%$%$### Don't need the bloody extra ones I even tried to change the permission still no go!!!!!! plz example show me |
![]() |
![]() |
![]() |
#115 |
Member
Join Date: May 2007
Posts: 98
|
what ??
|
![]() |
![]() |
![]() |
#116 |
Junior Member
Join Date: Mar 2008
Posts: 2
|
Unable to get Registry working
Hi,
I am a newbie to NSIS. Currently I am in a situation where my installer need to identify a software whether already installed or not and If installed, uninstal it and continue with my installer. This software is under .../Uninstall of registry and it does not have a fixed key. The key depends on its GUID and package. But, there is one string called "Display string" which is constant and based on which we can search for. Can I search this string and get the key from registry and then get the UninstallString with help of key. I tried with out using Registry.dll, but looks like not possible. I tried using Registry.dll but unable to get it working I am gettting compilation error in registry.nsh at this line registry::_Open /NOUNLOAD `${_PATH}` `${_OPTIONS}` I am using registry like this ${registry::Open} "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" "/K=0 /V=1 /S=1" $0 The error is "Error in macro registry: ![]() Help much appreciated Cheers Rahul |
![]() |
![]() |
![]() |
#117 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
rahulsubramanya
Probably there is something with the nsh file codepage. It must be not in Unicode (or maybe you are using Unicode build). |
![]() |
![]() |
![]() |
#118 |
Junior Member
Join Date: Mar 2008
Posts: 2
|
Hi,
Thanks for the reply How to check these compatibities? Any readme file tells this? or any source code? Can I build my self? Cheers Rahul |
![]() |
![]() |
![]() |
#119 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
|
![]() |
![]() |
![]() |
#120 |
Major Dude
Join Date: Jul 2004
Posts: 671
|
Fixed: ${registry::WriteExtra} with REG_MULTI_SZ (thanks David Irwin).
Added: now plugin can be compiled with GCC. "Registry" plugin v3.4 |
![]() |
![]() |
![]() |
|
Tags |
plug-in, registry |
Thread Tools | Search this Thread |
Display Modes | |
|
|