- NSIS Discussion
- [NEWBIE] Two problems with NSIS
Archive: [NEWBIE] Two problems with NSIS
r99t
18th April 2008 17:27 UTC
[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!
Joel
18th April 2008 21:58 UTC
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
r99t
18th April 2008 23:38 UTC
Thanks for your reply.
I will give my best, to do this. Thank you!
r99t
19th April 2008 00:13 UTC
Okay, double post but for your information:
2) done -> InstallColors 53aedf 000000 WORKS!
1) still no clue
Afrow UK
19th April 2008 00:26 UTC
Use /o to have sections unchecked. It's in the manual.
Stu
r99t
19th April 2008 00:40 UTC
Oh boy, it's so embarrassing cause it was sooo easy.
Thanks man. All my problems have been solved.
Thank you guys!
r99t
28th May 2008 10:06 UTC
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 ;)
pospec
28th May 2008 11:34 UTC
SetFileAttributes, it is in documentation
r99t
28th May 2008 12:27 UTC
Working just fine. Thank you!
r99t
5th June 2008 12:44 UTC
Hello again ;)
How can i protect my installer with a password?
Is there any example avaiable?
r99t
5th June 2008 17:26 UTC
Wow, that works. Thank you again!
r99t
8th September 2008 18:13 UTC
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.
Comperio
8th September 2008 18:20 UTC
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.)
r99t
9th September 2008 07:23 UTC
Uh yeah. It works, thank you! ;)
r99t
10th September 2008 16:21 UTC
...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.
r99t
30th September 2008 08:41 UTC
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?
demiller9
30th September 2008 18:35 UTC
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.
r99t
30th September 2008 21:54 UTC
Ah, thank you!
r99t
3rd October 2008 17:49 UTC
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?
r99t
12th October 2008 21:13 UTC
Can i define more than this global values: $0-$9
$11-... or something?
Anders
12th October 2008 23:07 UTC
you have another 10, $R0-R9, if that is not enough, you can add your own with the var instruction
r99t
13th October 2008 10:28 UTC
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 ;)
Anders
13th October 2008 13:33 UTC
read the helpfile
r99t
6th November 2008 09:11 UTC
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!
r99t
23rd November 2008 03:14 UTC
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!