Thread: Registry plugin
View Single Post
Old 11th November 2014, 09:30   #201
Senior Member
Join Date: Apr 2009
Location: Bulgaria
Posts: 191

I had the following problem. In my script I delete a registry key (with NSIS commands), then later in my script I check if the key exists, using registry::_KeyExists. Normally the check comes very near after the deletion. The problem is that the result from _KeyExists is 0 that means the key exists, but it doesn't exist anymore (I can see this with Regedit). But if I put "sleep 5000" before the check the results is correct, the plug-in returns -1. What is the explanation about this?

[edit #1]
I see that the information from me is not good enough. Actually I delete the registry key in separate installer, called in silent mode. I call it with ExecWait command and when it exists, I check if the registry key exists. Only in this situation I have a problem.

[edit #2]
Some additional information. I call the integrated installer (this one that I call in silent mode) several times. I saw that once (probably, because it opens some cmd-windows for short time) that the script runs after ExecWait, but my integrated installer is still working... This can explain the behavior that I mentioned before, but how I can be sure that the installer, called in silent mode (also compiled with NSIS) is finished? I thought that it is enough to call it with ExecWait...
TrifonovS is offline   Reply With Quote