@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).
Install not complete, but no errors.
46 posts
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.
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.
Alright cool, thank's very much for your help everyone!
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!?)
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!?)
@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).
I wrote this script a while ago to allow you to run an installer off multiple CDs/DVDs:
-Stu
!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
...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'.
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'.
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
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
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.
*Post Deleted*
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:
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.)
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.
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.
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.
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.
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?
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.
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.
Thanks very much stb. Cleared it up!