Skip to content
⌘ NSIS Forum Archive

Install not complete, but no errors.

46 posts

chrisofnine#

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)
chrisofnine#
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.
chrisofnine#
...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#
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#
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#
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#
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#
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#
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#
So just replace CopyFiles with File everywhere?

And how come it works fine on some computers if this is the problem?
Afrow UK#
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#
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#
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#
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
chrisofnine#
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#
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#
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#
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#
On my computer it returns "D:" (which is my DVD drive) and it works.
Why would it show anything else?
kichik#
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#
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#
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#
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.
chrisofnine#
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!