Archive: Installer Closes Without notice..


Installer Closes Without notice..
My installer calls a dll however after calling it, the installer closes by itself.
Is there a way to stop that? is that an error? plz help
Thank you


I fixed the previous problem, but now i got a similar problem. If i put ?u at the end of the system call... the installer closes by itself.
Thx for the help


Problem fixed
Thank you anyways!

However i got another problem now, which might be way easier to solve. The problem is... i have to see if a directory in the registry exists.
How can i do this?
Thanks again!


Get the folder you want to test for existence from the registry then make a call to IfFileExists using that folder name and tack on "*.*" as the filter.


IfFileExists "<my-registry-folder>\*.*" 0 +2
print "Hey I found the folder!"

rsegal i understand what you mean ... however its not working could you give me a better example...
Thanks again!


Originally posted by Sam_Engenuity
rsegal i understand what you mean ... however its not working could you give me a better example...
Thanks again!
What's not working for you specifically? Does the script you create not compile? Is the call to IfFileExists not working for you?

Everything runs fine, thats not the problem, the problem is i dont understand the code example your wrote

IfFileExists "<my-registry-folder>\*.*" 0 +2
print "Hey I found the folder!"

What did you mean by "My registry folder", How can i put a folder from the registry in the IfFileExists?

Heres an example of what i wrote that doesnt work
IfFileExists "HKCU Software\XXXX\XX" 0 +2
messagebox MB_OK "Hey I found the folder!"


Originally posted by Sam_Engenuity
Everything runs fine, thats not the problem, the problem is i dont understand the code example your wrote

IfFileExists "<my-registry-folder>\*.*" 0 +2
print "Hey I found the folder!"

What did you mean by "My registry folder", How can i put a folder from the registry in the IfFileExists?

Heres an example of what i wrote that doesnt work
IfFileExists "HKCU Software\XXXX\XX" 0 +2
messagebox MB_OK "Hey I found the folder!"
Ok I understand now. You need to first read your folder from the registry using a call to ReadRegStr...

ReadRegStr $R0 HKCU "Software\XXXX\XX" "<folder-registry-value>"

Where <folder-registry-value> is the name of the regsitry value that contains the folder name. Check the docs on ReadRegStr for more details on how it works.

NSIS online docs

Once you have the folder name in a register like $R0 as I've demonstrated above you can use that in the call to IfFileExists...

IfFileExists "$R0\*.*" 0 +2

Again consult the docs on IfFileExists for how it works. The first param is the file you want to check for existance of which in my example case is stored in $R0. We append the "\*.*" because we are looking for a folder. Note that you may not need to append the backslash depending on how your folder is stored in the register. If you don't need to append it you would just append "*.*" to your folder name. The second parameter is a relative jump for where you want to go if the folder was found. The third parameter is a relative jump for where you want to go if the folder wasn't found.

Thanks alot for your help! it works!!