|
|
#1 |
|
Junior Member
Join Date: Apr 2005
Location: Belgium
Posts: 22
|
Hi all,
After a lot of searching through this forum, and trying out different examples, I finally started developping the Installer I need. I have 3 DVD's, containing Technical Data, that has to be installed on our engineers laptop. To do this, I used the CopyFiles command. This works fine, but when swapping from Disc 1 to Disc 2, I get the error Wrong Volume (bla bla bla).... To solve this, I found a script in these forums. This script works fine, but doesn't have the MUI I like. Can anyone help me to join these two scripts into one working script that suits my needs? All help is appreciated... PS.: I'll attach the two scripts, to get some background information. Setup2.nsi contains the MUI, test.nsi contains "the swapping script". |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Apr 2005
Location: Belgium
Posts: 22
|
Number 2
|
|
|
|
|
|
#3 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,216
|
You need to copy (and modify) the whole .onInit Function from test.nsi to your script.
Then copy the GetNextParm Function too. That should be enough to make it work. -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Apr 2005
Location: Belgium
Posts: 22
|
Okay,
Thanks for the help! Does it matter where I place the functions? I mean, do I have to put it in the beginning, or can I just add it at the end of the script? |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Apr 2005
Location: Belgium
Posts: 22
|
Hi all,
I've modified the setup.nsi file as described above, and my installer still doesn't work. What am I doing wrong? In fact, the installer starts at the first disc, works fine, and then pops a message box that ask me to insert disc two. After doing this (and clicking OK), the message box keeps returning and the script hangs. I can't seem to figure out what I'm doing wrong... Heeeelp please...
|
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Apr 2005
Location: Belgium
Posts: 22
|
In addition, I can attach a printscreen of the error I get.
|
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,216
|
It loops because of this:
code: "$EXEDIR\DATA\SECT_RIC\RICOH_OLD\CD2.id" obviously does not exist. What is $EXEDIR at that time (put it in your MessageBox to find out). -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Apr 2005
Location: Belgium
Posts: 22
|
Obviously, it goes to the TEMP dir.
And the CD2.id file is on the disc. How do I direct the script to my CD-ROM drive? Is there a special variable for this? I don't want to specify the drive letter in the script, as this may vary from user to user. Attached: Printscreen $EXEDIR in MB |
|
|
|
|
|
#9 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,216
|
In .onInit, you can get the CD-Rom drive letter from $EXEDIR like so:
StrCpy $CDDRIVE $EXEDIR 2 ; $CDDRIVE will be e.g. E: Don't forget to declare the $CDDRIVE var with Var CDDRIVE Edit: No that won't work. -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#10 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,216
|
Updated .onInit function to fix it:
code: I've used a completely different method here (much simpler). -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#11 |
|
Junior Member
Join Date: Apr 2005
Location: Belgium
Posts: 22
|
So this replaces the whole .onInit function?
Thanks Stu, you da man!! I'll try it out later on today, and comment it here in this thread. |
|
|
|
|
|
#12 |
|
Junior Member
Join Date: Apr 2005
Location: Belgium
Posts: 22
|
Ok, here are my comments on the script.
Everything works fine, except for one small error. After compiling the script, the .exe file is made. When executing the file, it doesn't start. When executing the same file a second time, it works. Odd... Can this be fixed? |
|
|
|
|
|
#13 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,216
|
I'll have a look when I get home. There's probably something that I over-looked.
-Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#14 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,216
|
I found the problem was with Exec. For some reason I had two lots of quotes on there (probably from the old script when it had parameters with it).
It also fails if you change the OutFile name, so I've added a define which will make things easier incase you decide to change the OutFile to something other than 'setup.exe': code: -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#15 |
|
Junior Member
Join Date: Apr 2005
Location: Belgium
Posts: 22
|
Hi,
It has been a long time since I've posted here. I still have an error. The setup file has to copy itself to the temp-directory, and then copy all the files from the DVD's to the Installation Directory. The part of the TEMP directory works fine, but everything that comes next, doesn't work. Can anyone help me out? Please? |
|
|
|
|
|
#16 | |
|
Junior Member
Join Date: Apr 2005
Location: Belgium
Posts: 22
|
Quote:
The Copy Process fails at the first disc. That's where the problems start. I also discovered that it isn't possible to select the root of the partition (for example D:\). The install button is grayed out when I select this. Is there a fix for these problems? |
|
|
|
|
|
|
#17 | |
|
Junior Member
Join Date: Apr 2005
Location: Belgium
Posts: 22
|
Quote:
Is the $EXEDIR in this script the DVD or the Temp-directory? |
|
|
|
|
|
|
#18 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,216
|
You need to use $CDDRIVE rather than $EXEDIR. $EXEDIR will indeed be the same as $TEMP (as that is where the installer exe is residing).
-Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#19 | |
|
Junior Member
Join Date: Apr 2005
Location: Belgium
Posts: 22
|
Quote:
If you have a solution for the other problem, please share :-) I mean this problem "I also discovered that it isn't possible to select the root of the partition (for example D:\). The install button is grayed out when I select this." |
|
|
|
|
|
|
#20 |
|
Member
Join Date: Jan 2005
Location: Seattle, WA
Posts: 66
|
Try using AllowRootDirInstall
|
|
|
|
|
|
#21 |
|
Junior Member
Join Date: Apr 2005
Location: Belgium
Posts: 22
|
Thanks guys,
You've solved my problems! I really love this community...
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|