Archive: [NEWBIE] Two problems with NSIS


[NEWBIE] Two problems with NSIS
Hi y'all!

I'm a newbie on NSIS but i will try to make an installer for my files. Thanks to HM NIS Edit i get a script with the wizard.

Now i have two little (big for me) problems with my installer.

1.) I've defined 3 components for my users to choose, what a user want to install with the installer. Unfortunately all of these components are checked by default. I want only one checked by default and the other two options unchecked. I dont know, how to do this.

2.) I want to customize the instpage. I want an other text- and background-color at the instpage in this section, where u can see, which files will even be installed. Due the search in this board i find something related (i think):

"SetCtlColors $idontknow 0x000000 0x53aedf"

(the hex is the color, that i want to use for the text-color. 0x000000 its my bg-color)

As you can see, i dont get a glue, where and how i change these colors for this instpage at this point.

If u got the solutions for my problems, please post it here (please a little more detailed) :)

Thanks a lot!


Hi! :)

1) See one-section.nsi example, you can use sections.nsh header file to manipulate the style of your sections: gray-out, readonly, etc.

2) Or, you can use InstallColors


Thanks for your reply.

I will give my best, to do this. Thank you!


Okay, double post but for your information:

2) done -> InstallColors 53aedf 000000 WORKS!

1) still no clue


Use /o to have sections unchecked. It's in the manual.

Stu


Oh boy, it's so embarrassing cause it was sooo easy.

Thanks man. All my problems have been solved.

Thank you guys!


Hi y'all guys,

just another question about file attributes.

Is it possible to set an attribut on install (on runtime)?

f.e.:

Section "1"
SetOutPath "$INSTDIR"
File "${NSISDIR}\somefile.txt" READONLY
SectionEnd

Is this possible and if so, how can i set it up?

I don't find any examples in the FAQ/Docu. Maybe i'm blind ;)


SetFileAttributes, it is in documentation


Working just fine. Thank you!


Hello again ;)

How can i protect my installer with a password?

Is there any example avaiable?


http://nsis.sourceforge.net/PassDialog_plug-in


Wow, that works. Thank you again!


Hi y'all again.

I got a news problem. I'll install a font with my installer. Here a part from may section:


[...]
SetOutpath "C:\Windows\Fonts"
File "${NSISDIR}\projects\rgwgui100\cstrike\resource\TrajanPro-Regular.otf"
[...]


I compile the script, start the installer, finish the install-process. Anything is fine.

when i browse to the fonts-directory i can#t find the font in there. :(

is there any solution to install the font silently. I don't have a clue, how to perform this.

It takes more than just copying the file. It also have to be registered by Windows. Have a look at the Advanced font install Wiki page for maybe a better solution.

(PS: You should use the built in variable $FONTS when referring to the fonts folder. Not all Windows installations are the same, so you may end up be going to the wrong folder.)


Uh yeah. It works, thank you! ;)


...and another question (issue)

Some people (using my installer) get the following error:

"invalid file handle 5"

I can't find my mistake and hope, you can give me some suggestions to solve that problem.

do you need the *.nsi?

ty in advance

EDIT: only @ vista and i dont know why.


Hi y'all.

Just a short question.

Please have a look at this screenshot:

http://img265.imageshack.us/my.php?i...onnsizeku7.jpg

How can i add the size and an icon to my installer, to be shown on the control panel and add/remove programs?


The icon is taken from the registry value "DisplayIcon" in the uninstall\<AppName> key. If you provide a value "EstimatedSize" they will use that value for the size.

If you don't provide those they start guessing.


Ah, thank you!


Another question :)

Please have a look at this picture:

http://img88.imageshack.us/my.php?image=possiblefp3.jpg

Is it possible to modify the components page from the red to the green one? I wanna have it more widther. If its possible, where can i do this?


Can i define more than this global values: $0-$9

$11-... or something?


you have another 10, $R0-R9, if that is not enough, you can add your own with the var instruction


Thank you for your reply!

Can you please give me an example for a 'var instruction' to get f.e. a $10?

I'm not that professional ;)


read the helpfile


hi y'all again,

i do have a serious problem with my installer. He only works on vista but not on xp. i don't find a solution for this problem, so i think you can be my last chance (i hope so).

Can you please have a look at my script? I don't get it, why this won't work on xp.

I hope you have some time for me and my problem. Here's my script:

http://r99t.dartdiddl.de/nsis/dont_work_on_xp.nsi

It would be really great, if you can help me.

Thank you in advance!


Okay, i just find out, how to attach files. maybe this will help you to help me. I don't see the problem to get the installer working on xp. I do get cpu load up to 99% but nothing happens.

Please take a look to my script. i can't find the error. maybe u can find him. :s

Thanks a lot!