|
|
|
|
#1 |
|
Member
Join Date: Nov 2008
Posts: 72
|
Hi
Just trying some code & unfortunately I can't get it to work. I've tried deleting lines 9, 10, 11, 12 & 38-42. But it still won't compile. I've tried within one set of Apostrophe's, and within 2; CreateShortcut "$STARTMENU\maint\maint.lnk" "$ProgramFiles\maint\maint.exe" Yet I still find myself unable to successfully compile the script. Could someone please help me get the following (or similar) to compile? code: Thanks in advance, Panarchy |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Feb 2007
Posts: 672
|
What is the error message you get?
It looks like you start the rest of your CreateShortcut parameters on a new line. If you want to do that, you have to end the first line with a backslash: code: |
|
|
|
|
|
#3 |
|
Member
Join Date: Nov 2008
Posts: 72
|
LOL, I don't believe it!
My script can now compile! ![]() Now just need to work out the following; - How to make more than one checkbox on the finish page - & How to successfully create a start-menu shortcut Please help me work out the aforementioned. Thanks in advanced, Panarchy |
|
|
|
|
|
#4 |
|
Member
Join Date: Nov 2008
Posts: 72
|
Hi
I have two features which I haven't been able to get to work. 1. Can't compile! (LOL) 2. Need multiple Checkboxes on the finish page (one for .exe one for .msc) Here is my latest code; code: Please help me with getting this to work! Thanks in advance, Panarchy BTW: When commenting out the following, the code compiles; !insertmacro ExtractSome "$PROGRAMFILES\SOME" |
|
|
|
|
|
#5 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Your CreateShortCut is incorrect. The first parameter must be the full path to the shortcut to be created. The second parameter is the file/path to execute. Check the manual on the correct usage.
To add an additional check box on the finish page requires defining a custom show function (!define MUI_PAGE_CUSTOMFUNCTION_SHOW ...) and in it a ${NSD_CreateCheckBox} line. Stu |
|
|
|
|
|
#6 |
|
Member
Join Date: Nov 2008
Posts: 72
|
Thanks for both of your answers.
Could you please also find out why my program doesn't compile? And help me get the program to compile? Thanks in advance, Panarchy Hint: Line 28 |
|
|
|
|
|
#7 |
|
Major Dude
Join Date: Feb 2007
Posts: 672
|
The output of the NSIS compiler can be very helpfull.
Please have a look at it. And if you can't figure out what's wrong, please give us the error reported by the NSIS compiler, so it's easier to see what's wrong. The NSIS output for your script is: code: When you look closely at this first line of the ExtractSome macro, you might notice that you forgot a single quote after ${ToDir}. Hence a failed compile. |
|
|
|
|
|
#8 |
|
Member
Join Date: Nov 2008
Posts: 72
|
Hahahahaha, thanks. Fixed.
Perfect |
|
|
|
|
|
#9 |
|
Member
Join Date: Nov 2008
Posts: 72
|
Thanks... well everything works now, except the shortcut creation within the start menu.
The file [some.exe] is successfully extracted within %programfiles%, however the shortcut is NOT created within the Start Menu. Some help here please. Thanks in advance, Panarchy |
|
|
|
|
|
#10 | |
|
Major Dude
Join Date: Feb 2007
Posts: 672
|
Quote:
|
|
|
|
|
|
|
#11 |
|
Major Dude
Join Date: Feb 2007
Posts: 672
|
You can't split a string on several lines with a backslash I mentioned before.
So it should be: code: |
|
|
|
|
|
#12 |
|
Member
Join Date: Nov 2008
Posts: 72
|
Worked it out myself;
CreateShortcut "$SMPROGRAMS\Some.lnk"\ "$PROGRAMFILES\SOME\Some.exe" |
|
|
|
|
|
#13 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You can split strings over multiple lines:
code: Your code differs in that you have used quotes thus creating 2 parameters. Stu |
|
|
|
|
|
#14 |
|
Member
Join Date: Nov 2008
Posts: 72
|
Okay... I think I understand.
Thanks |
|
|
|
|
|
#15 |
|
Member
Join Date: Nov 2008
Posts: 72
|
How do I make an MMC (*.msc) load at completion of installer?
Currently; code: Which works for *,exe, just not *.msc Please tell me how I can load the MMC with the checkbox on the Finish page. Thanks in advance, Panarchy |
|
|
|
|
|
#16 |
|
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
MSC files themselves are not executable files like EXEs...
You'll need to call the actual EXE (MMC.EXE) with parameters. This will probably help get you started: http://technet.microsoft.com/en-us/l.../cc757725.aspx To run it on the finish page you have two options. You can to supply the EXE name with MUI_FINISHPAGE_RUN and also use MUI_FINISHPAGE_RUN_PARAMETERS to pass in the parameters. Or you could create your own function using things like Exec, ExecWait, etc. and use MUI_FINISHPAGE_RUN_FUNCTION to call the function. (All info about these parameters are in the MUI help docs.) |
|
|
|
|
|
#17 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
I would recommend using ExecShell in a custom run function.
Stu |
|
|
|
|
|
#18 |
|
Member
Join Date: Nov 2008
Posts: 72
|
Thanks Comperio, had to rename the file so it didn't have a space though... however, it now works
![]() Thanks Afrow: I'll do research into that function |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|