- NSIS Discussion
- Install not complete, but no errors.
Archive: Install not complete, but no errors.
chrisofnine
21st July 2006 16:46 UTC
Install not complete, but no errors.
When I run the installer from internet explorer (a link to it), the installer runs with no errors, then flys through it in like 10 seconds. When you check the directory the file was created where it should be, but none of the files inside of it are created. If you run the installer directly from the file, it works perfectly and installs everything. Could this be an option in Internet Explorer that is causing it to bug out? (This does not happen on all computers)
kichik
22nd July 2006 10:11 UTC
Not much can be said without the script, but it seems like you're missing SetOutPath.
chrisofnine
22nd July 2006 17:07 UTC
No it can't be the script, because it works perfectly every time when you run it straight off the file, and on most computers it runs perfectly off the browser link too, it's just certain computer's it's doing that.
kichik
22nd July 2006 17:09 UTC
Still, I can't say much without knowing what's happening...
chrisofnine
24th July 2006 14:38 UTC
...I explained what's happening. When you choose the directory to install it and continue with the install, it fly's right through it in 5 seconds and only creates the main folder. It does not actually install any files. Like I said though, on the same computers that are having trouble, if you go and run the install directly from the file itself (by double clicking on the exe) then it will install everything properly. I initially assumed that this was some sort of option with internet explorer causing this? Or what could it be?
chrisofnine
24th July 2006 14:59 UTC
Another way to put this, would be that if you choose to "Open" the exe file on the install, it doesn't work. When you choose to "Save" the exe file and run that, it works...
kichik
24th July 2006 18:30 UTC
There aren't enough details. I can't reproduce this problem and no one else has reported it. I can't help you without an example reproducing the problem. It doesn't have to be your exact script, as long as it shows the problem.
chrisofnine
24th July 2006 18:38 UTC
Like I said though, I can't even make a script that would produce the problem whenever I wanted. It only happens on some computers. Even if I gave you the script to look at, it would work perfectly. I've had people look at the script and have tested it many times.
I'm not trying to be an ass or anything, I'm just saying I'm positive it's not the script, and was wondering if anyone else had experienced something similar or knew what it could be. I do appreciate your help though.
kichik
24th July 2006 19:17 UTC
Fine, be it your way. But I'll guess only once. Make sure no anti-virus/anti-spyware/anti-malware/anti-whatever is blocking the installer, make sure SetOutPath is set properly, make sure SetOverwrite is set properly, check the extraction log and install.log.
chrisofnine
24th July 2006 20:01 UTC
If I can send you my script I totally will, I'm not keeping that from you - another set of eyes never hurts! What email can I send it to?
kichik
24th July 2006 20:23 UTC
kichik@users.sf.net.
kichik
25th July 2006 23:22 UTC
Your script uses CopyFiles from $EXEDIR to $INSTDIR. $EXEDIR is Internet Explorer's cache folder when you use the "Open" button. Use File instead.
chrisofnine
26th July 2006 14:32 UTC
So just replace CopyFiles with File everywhere?
And how come it works fine on some computers if this is the problem?
Afrow UK
26th July 2006 15:26 UTC
CopyFiles copies files from one folder on the users' machine to another folder on the users' machine. CopyFiles does not include the actual files in your installer. File on the other hand puts the files into the install executable and compresses them if need be.
If it works on some machines then perhaps those machines have the files to be installed with the setup executable (not actually inside the executable).
-Stu
chrisofnine
26th July 2006 21:57 UTC
Well I used CopyFiles because I have very limited space on the DVD this is going on. I don't have the free space to have all the files inside the installer itself!
If I'm looking at this the wrong way, can you show me an example?
Thanks a bunch.
Afrow UK
26th July 2006 22:40 UTC
I don't understand now lol
You can't fit the files on the DVD if they're all in the installer in compressed format, but you have enough space if you have them outside the installer uncompressed?
-Stu
JoeMcC00L
26th July 2006 23:27 UTC
I have used both CopyFile and File when writing an installer. Here are some examples that might be helpful:
SetOutPath $INSTDIR
File ./foo.bar
# This tells the NSIS compiler to look for foo.bar and
# compress it into the installer. If you have your
# installer executable on the CD, you DO NOT need to package
# foo.bar separately. When your executalbe is run on the
# end user's machine, foo.bar is extracted and placed in
# $INSTDIR
CopyFiles $EXEDIR/foo.bar $INSTDIR
# This tells the compiler that when the installer is run,
# there will be a file called foo.bar in $EXEDIR, or in
# your case the DVD you're putting the installer on. When
# you use CopyFiles, the compiler DOES NOT compress foo.bar
# into the executable, and you have to supply foo.bar
# separately. In our example, it will copy foo.bar to
# $INSTDIR only if foo.bar is a separate file and it
# resides in the same directory as your installer
So if you have space limitations, it would be wise to use "File" whenever you can in your installer. This will compress all your files into one executable. If you want a third pair of eyes to look at your script, send it to:
joe.jmcc00l@gmail.com
Hope this helps!
Joe
Afrow UK
27th July 2006 00:08 UTC
And always use back strokes "\" and not forward strokes "/" in Windows paths :p
-Stu
JoeMcC00L
27th July 2006 15:42 UTC
heh, my mistake. :D
chrisofnine
27th July 2006 16:21 UTC
Didn't explain myself fully - caused a bit of confusion!
The reason I can't compress all the files into the installer is because I need the option to run the files directly off the DVD as well without the install! (on insertion of the DVD, a page comes up asking if they would like to install or if they would like to run straight off the DVD). Not all the user's have permission at all times to install, so this is why it has to be set up that way.
I emailed you the script as well McC00L. Have a look!
I'm starting to get very confused now too though. Will CopyFiles work for my situation? If so, what's the problem, and if not, what are my alt. options?
Thanks very much for your guys' help! Much appreciated.
Comperio
27th July 2006 17:30 UTC
Based on your last post, it sounds to me as if you need 2 versions of the install. One that you download as a single file and another that you distribute on DVD. (Or maybe you just pack the full install into one compressed file, such as an ISO image, zip file, etc.)
Another thought would be to somehow detect whether or not the install was run from a DVD or from the internet. If it were an internet install, then you would download just the main setup program which would then run and download the rest of the files (perhaps to users TEMP folder). Once the full set of files is downloaded, then it could then continue with the install using the CopyFiles command--only this time, you'd copy from the user's TEMP folder instead of $EXEDIR). To accomplish this, you'd probably want to use a plugin such as InetLoad (search the wiki/forums for more info.)
The bottom line here is that you can't copy files from the $EXEDIR when you are running directly from the browser for reasons Kichik mentioned earlier in this post.
chrisofnine
27th July 2006 18:36 UTC
This won't be put online anywhere, only distributed on the DVD.
And I'm not really clear as to Kichik's explanation of why CopyFiles doesn't work...like I said before - it works on some computers! (mine for example) That's why I'm so confused that your saying it's the CopyFiles command causing the problem. Unless it's a setting on certain computers for creating temp files or anything like that?
kichik
27th July 2006 18:39 UTC
Have the installer show you $EXEDIR when it's running and it'll all be clear. Use:
Function .onInit
MessageBox MB_OK $$EXEDIR=$EXEDIR
FunctionEnd
chrisofnine
27th July 2006 20:13 UTC
On my computer it returns "D:" (which is my DVD drive) and it works.
Why would it show anything else?
kichik
27th July 2006 20:42 UTC
Because when you open it from Internet Explorer using the Open button, it first "downloads" the file to the cache folder and then runs the file from there. You cannot use $EXEDIR unless you're running the installer from the DVD itself.
chrisofnine
27th July 2006 21:24 UTC
I really don't mean to be the devil's advocate here or anything, but I did run it in IE and pressed the Open button.
Here's my steps (just trying to make sure we're on the same page!):
1. Put in the DVD. It autoruns, and the first page comes up with a disclaimer on an htm file that I made.
2. Agree to that, and you are taken to a new htm page that asks if you would like to install the files to your hard drive (recommended) or if you would like to view them straight off the DVD. Clicked Install.
3. A popup appears asking to Open the file, or Save it to my computer. I choose to Open the file.
4. The install continues through...choose the files...choose the directory...and it installs everything perfectly to my computer.
I did this with that hunk of code you posted and it displayed D: like it should as the $EXEDIR.
I totally understand what you mean now that IE downloads a temp file and runs it off that. Couple questions for that:
1. Why is it not doing it on my computer?
2. Do all browsers do this?
A couple specific Q's:
1. Is this problem a setting on the user's computer that I can just tell them to make sure they have "______" checked off under their IE properties? Then the CopyFiles command should still work.
2. If this is a continuing and permanent problem, is using 'File' my only alternative? As I said before, this MUST have the option of install or no install, so I don't have room to include all the files in the installer.
3. Perhaps is there an alternative to using '$EXEDIR'? Can the installer figure out what the user's DVD drive is and use that? Or could the user possibly enter their DVD drive letter and that would be stored and used?
Again, I can't thank you guys enough for your help and patience!!!
kichik
27th July 2006 21:29 UTC
It depends on Internet Explorer's setting. I'm not sure exactly which one changes that, probably something zone related. But I'd say having the user change Internet Explorer's setting in order to install your application is a bit off-track.
What you should do is simply not use an HTML page and use the built-in license page or your own custom program. If you want to add formatting to the license, you can use RTF instead of plain text.
chrisofnine
28th July 2006 14:32 UTC
As for my first question (IE setting) which is the only one that was answered, I meant that I've already distributed some copies to people, so if they contact me with this problem, can I just tell them to check off _____ IE property.
kichik
28th July 2006 14:35 UTC
Have them execute the installer manually.
chrisofnine
28th July 2006 21:51 UTC
I understand the problem fully now. Stoooopid IE!!
Still hazy on the fix though...would appreciate the following answered!
1. Do all browsers do this?
2. Is using 'File' my only alternative? As I said before, this MUST have the option of install or no install, so I don't have room to include all the files in the installer.
3. Perhaps is there an alternative to using '$EXEDIR'? Can the installer figure out what the user's DVD drive is and use that? Or could the user possibly enter their DVD drive letter and that would be stored and used?
Thanks a bunch for stickin around kichik - appreciate the help!
stb
28th July 2006 22:48 UTC
@1: I wouldn't rely on the browsers behaviour. If the user "downloads" and starts a file you link to in a html page, you can't rely on EXEDIR or current dir. I don't think this is a problem of IE (if you download the file from remote machines (http), you can't have EXEDIR the same as the html file).
@2: No. Avoid using html pages with links to your installer or avoid separating installer and install data.
@3: Yes. Yes. Yes. (You're free to do this.) I don't think this way is the smart one (see 2. or kichik's last two comments).
kichik
28th July 2006 23:44 UTC
You shouldn't search for the correct DVD as you can't make sure you've found the right one and because it wouldn't work in case someone copies over the setup files.
As stb said and as I said a couple of posts ago, you should not use HTML in a browser and except a specific behavior. Use your own program to display the license, or the license page of NSIS itself.
chrisofnine
31st July 2006 14:33 UTC
Alright cool, thank's very much for your help everyone!
chrisofnine
31st July 2006 16:43 UTC
Stb, how would implementing #3 work? (Having the installer run off the DVD drive instead of $EXEDIR)
I do understand what you and kichik are saying about displaying the installer differently, but the options I have to work with for this specific DVD are very limited, so I need some workable work-arounds! If you could kindly walk me through how this setup would work that would be wicked!
(Like I said, including the files in the installer is out of the question, and opening the installer seperatly is sorta out of the question, so this seems like the best alternative by far!?)
stb
31st July 2006 17:03 UTC
@chrisofnine: Sorry, I will not code this for you (for free). Exchanging new ideas, great code and problem solutions in this forum is at a nice social level -- but IMHO this is beyond that. If you want to have something done for free, you'll need a "better" problem (with some advantage for others).
Afrow UK
31st July 2006 17:12 UTC
I wrote this script a while ago to allow you to run an installer off multiple CDs/DVDs:
!define OutFile "setup.exe"
!define TempCD "$TEMP\tempCD.tmp"
OutFile "${OutFile}"
Var CDDRIVE
Function .oninit
IfFileExists "${TempCD}" fromHD
CopyFiles "$EXEDIR\${OutFile}" "$TEMP"
WriteINIStr "${TempCD}" "CD" "Drive" "$EXEDIR"
Exec "$TEMP\${OutFile}"
Abort
fromHD:
ReadINIStr $CDDRIVE "${TempCD}" "CD" "Drive"
Delete "${TempCD}"
FunctionEnd
-Stu
chrisofnine
31st July 2006 22:54 UTC
...I'm not asking for the code to be written for me...I'm just asking how it's done! Anyone who doesn't have a stick up their butt want to help me out?!!
Stu - thanks for that, my next step will be to jump to a 2 DVD install definatly - that will come in handy! For this version however I really need to keep it on 1. That's why I was looking for the alternative to '$EXEDIR'.
Afrow UK
31st July 2006 23:00 UTC
What would you need an alternative to $EXEDIR for? Would that be to identify which drive the DVD is in if the installer is run from another location?
Like kichik said, there's no way. All I can suggest is you don't let the setup executable run if the files that are needed aren't in $EXEDIR\*whatever*.
Another solution would be to write $EXEDIR to the registry when the DVD is inserted with autorun, but not all PC's have autorun enabled ;)
-Stu
chrisofnine
3rd August 2006 15:28 UTC
Ya if I could just put the DVD Drive instead of $EXEDIR, then it would work every time...instead of IE making the temp file and running it from there.
fistos
3rd August 2006 16:25 UTC
*Post Deleted*
- NSIS Discussion
- Install not complete, but no errors.
Archive: Install not complete, but no errors.
Comperio
5th August 2006 17:48 UTC
One alternative to your dilema might be to build the HTML page on the fly on the user's local drive (say in the TEMP folder or other directory).
Have a separate EXE do the work (like say "launch.exe"). This would allow you to edit the main HTML file during launch to basically "hard code" the link path to the exact directory on the DVD drive.
The 2 challenges that I see:
- you may have to re-code your HTML to deal with other links, such as graphics files, that might be present. (To make it easier, you might want to just extract the entire folder tree to a temp file so that the only thing you'd have to change is the path to the EXE link.)
- You might want to somehow clean up the user's temp area when they are done with the install. (I haven't really thought much about the best way to do that.)
chrisofnine
8th August 2006 15:20 UTC
I think I understand where you're going Comperio, but how would you hard code the path to the DVD drive when launch.exe is executed?
I don't think this will be a feasable fix though, because as I said there must be the option to not install anything and run it right off the DVD, as some user's will have totally locked down computers.
Comperio
8th August 2006 17:46 UTC
The paths would be "hard coded" in the fact that launch.exe would determine which drive it's running from and then modify the temp HTML file to refelect the full path (instead of a relative one).
Users could still browse the CD and run from there. (The only thing that this would change is the "front end" or the HTML page. The actual setup and the other files would remain unchanged.)
And becuase it's only the setup.exe file that seems to be causing the issue, you might be able to still run the HTML file off the CD, but just disable the link to install. (or omit it completely and let LAUNCH.EXE create the link on the fly.)
All these are just suggestions for you to try.
chrisofnine
9th August 2006 22:29 UTC
I don't really understand how this works around the initial problem though, because what's stopping IE or any browser from creating that same file and running the install from there?
stb
9th August 2006 23:32 UTC
Nothing. You can't stop IE from creating some downloaded file within TEMP or elsewere.
I think you basically have three choices:
1) bad design: try to detect DVD/CD drive with data files. Maybe this will not work for all users (reminds me about some PC games about 10 years ago). If you really want to do this, search for "detect CD drive" or something like that.
2) complicated design: Comperio's idea was that you start some "launch.exe"-Installer that helps your real installer to detect the CD drive. There may be problems, anyway. Maybe you need to set some registry key or environment variable to your data source (i.e. DVD drive letter).
3) clean design: create some setup.exe/autorun.exe/launch.exe directly on the DVD. This exe can be created with NSIS and some features to not install anything (e.g. just run from DVD). NSIS installers can do everything. It's up to you.
chrisofnine
11th August 2006 18:01 UTC
Thanks very much stb. Cleared it up!