Archive: Help please? Complete newb here


Help please? Complete newb here
Hi Afrow UK, I'm just a beginning noob at NSIS right now, and I'm having a bit of a trouble. I'm trying to use a function that grays out the button if the directory the person chose was wrong. I've looked in

http://nsis.sourceforge.net/FindIt:_...le_/_directory

http://nsis.sourceforge.net/A_sample...stall,_etc.%29

http://forums.winamp.com/showthread....ight=findfirst

But I just don't understand anything!

Where do I put it?

Is it the same thing as graying out button?

Does it automatically try to find the file?

Is any of the links similar to the function "automatically found the file" when it reaches the change install directory page on installer?

Where do I put the code?

How do I put the code?

I hope people here are able to help me :confused: (the attachment I have is the one I have right now)


First of all, just some tips. I recommend switching to MUI2 (!include MUI2.nsh) and using solid compression (SetCompressor /solid lzma).

Which button are you trying to disable exactly? The Next button on the directory page? If so see:
http://nsis.sourceforge.net/Docs/Cha...tml#4.7.2.1.10

Stu


I'm trying to make the button go gray when the person highlights the wrong directory in the "Browse" window when you press Browse to change install directory AND the installer will attempt to find the folder "addons"

I got the gray button out part, but what about the installer automatically finding a file?

And I don't completely understand the compression methods, what's the difference between lzma and /solid lzma? Faster compression? better compression?

also


; MUI 1.67 compatible ------
!include "MUI.nsh"
!include "MUI2.nsh"

That link I posted has an example of validating a path contains a certain file (in that case, winamp.exe). Look up IfFileExists in the docs. It can be used for files and directories. Again, look up SetCompressor in the docs. /solid has better compression. Finally, no you don't put both includes you only put the one.

Stu


file_to_check_for jump_if_present [jump_otherwise]

and

IfFileExists $WINDIR\notepad.exe 0 +2
MessageBox MB_OK "notepad is installed"


If I just put the IfFileExists, it would require a function which does not say in the scripting reference, and is file_to_check_for jump_if_present the function or section or what?


Seriously, please read what I post. Here is the link again:
http://nsis.sourceforge.net/Docs/Cha...tml#4.7.2.1.10

Stu


"Abort" doesn't solve an other problem
Hi, I've read your post but the problem is that Abort will close the installer and user can't choose a different folder. Do you have a suggestion for don't allow GotoNext page?

Function .onVerifyInstDir
IfFileExists $INSTDIR\Winamp.exe PathGood
Abort ; if $INSTDIR is not a winamp directory, don't let us install there
PathGood:
FunctionEnd


sorry to everyone "Abort" works... the problem was an other one
sorry to everyone "Abort" works... the problem was an other one in the event onInit.... I wrote where it was my mistake on the post 'how to deny "goto next page"?'