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?
Registry plugin
229 posts
seems like i have same issue. cause under 64 bit windows, the rigstry keys go to win6432node ....
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:
Thanks very much, Ehtyar.
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:
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.if (CreateProcess(NULL, szBuf, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
{
WaitForSingleObject(pi.hProcess, INFINITE);
CloseHandle(pi.hProcess);
Thanks very much, Ehtyar.
Ehtyar
Changed: small optimization.
"Registry" plugin v3.1
"Registry" plugin v3.1
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.
Thanks again, Ehtyar.
Fixed: possible memory overflow (changed lstrcpy to lstrcpyn).
"Registry" plugin v3.2
"Registry" plugin v3.2
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!
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!
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.
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.
Fixed: registry::SaveKey short root name didn't translated to a long name.
"Registry" plugin v3.3
"Registry" plugin v3.3
Thanks for the quick update!
Any comment on my post above about using Sleep times with your plugin?
Any comment on my post above about using Sleep times with your plugin?
wraithdu
No comments. I don't understand your post.
No comments. I don't understand your post.
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.
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.
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)?registry::RestoreKey is the only one.
To import all registry information before continue, you could use the following code:
ExecWait 'regedit /s "[file]"' $var
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
Also, thank you so much for this plugin Instructor, it's wonderful.
QM
So, just confirming, all registry operations except restore wait for the operation to complete before continuing?Yes
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".....
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".....
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
thks
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..
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..
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
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
plz example show me
Can you Help!?
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
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
what ??
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:😳pen on macroline 1"
Help much appreciated
Cheers
Rahul
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:😳pen on macroline 1"
Help much appreciated
Cheers
Rahul
rahulsubramanya
Probably there is something with the nsh file codepage. It must be not in Unicode (or maybe you are using Unicode build).
Probably there is something with the nsh file codepage. It must be not in Unicode (or maybe you are using Unicode build).
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
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
🙂 OK
Are you using Unicode build?
Are you using Unicode build?
Fixed: ${registry::WriteExtra} with REG_MULTI_SZ (thanks David Irwin).
Added: now plugin can be compiled with GCC.
"Registry" plugin v3.4
Added: now plugin can be compiled with GCC.
"Registry" plugin v3.4