|
|
#1 |
|
Junior Member
Join Date: Jul 2002
Posts: 3
|
I'd love to have my CDROM autoplay and then check the registry to see if my app is already installed.
It should then run the installer if not installed, or run the app if already installed. Is this possible with NSIS? I've searched around but I'm starting to think this is not possible. Any suggestions on how to accomplish this much appreciated! |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: May 2001
Location: Winter Park, FL
Posts: 1,776
|
Yes, this is very possible.
First, you should know how to autorun the app. If you don't, then I can tell you later. Second, In the .nsi script type the following example, but replacing it with your appropriate coding: code: The Reg key will replace the InstallDir with what the user has placed instead. Hope this helps -Duane |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jul 2002
Posts: 3
|
Thanks Duane. It's the "now that I know the app is installed, dont run the NSIS installer, but run the app instead" part that I can't seem to get to work. I do have the app launching after the install is complete just fine.
|
|
|
|
|
|
#4 |
|
Guest
Posts: n/a
|
Do something like this:
code: To autorun, create a file "autorun.inf" containing this: code: Good luck, -Hendri. |
|
|
|
#5 |
|
Junior Member
Join Date: Jul 2002
Posts: 3
|
Thanks
Thanks! Not having the code in an .onInit function is where I was messed up!
|
|
|
|
|
|
#6 |
|
Senior Member
|
I would prefer checking the if the file exist (fileexist) instead of the registry. If the user has deleted the file, then that method would fail to exec it.
|
|
|
|
|
|
#7 |
|
Guest
Posts: n/a
|
Yes, you need to perform a FileCheck before execution. But running from CD, we cannot do without the registry since we don't know where the app has been installed.
-Hendri. |
|
|
|
#8 |
|
Junior Member
Join Date: Jul 2002
Posts: 42
|
Just wondering, can't you just check the registry key to see if it exists? If it doesn't, then the app wouldn't have been installed
|
|
|
|
|
|
#9 | |
|
Guest
Posts: n/a
|
Quote:
-Hendri. |
|
|
|
|
#10 | |
|
Senior Member
|
Quote:
|
|
|
|
|
|
|
#11 | |
|
Guest
Posts: n/a
|
Quote:
code: |
|
|
|
|
#12 |
|
Senior Member
|
Wouldn't this be better:
code: I would think you would want the installer to run if the file is not there. |
|
|
|
|
|
#13 |
|
Guest
Posts: n/a
|
My solution is intended to run the program on harddisk if installed. Otherwise the installation will continue. So no aditional installation needed that should be run. My solution prouces a small exe can be put on CD, autorun and work as installer or as program starter.
-Hendri. |
|
|
|
#14 | |
|
Senior Member
|
Quote:
|
|
|
|
|
|
|
#15 |
|
Guest
Posts: n/a
|
So indeed, we need a proper uninstall, but that was not he question
![]() -Hendri. |
|
|
|
#16 |
|
Guest
Posts: n/a
|
A solution to the problem that people delete applications instead of uninstalling them could be this: if no regkey -> just install. If the regkey is present -> present an InstOpts dialog asking to "reinstall" or "run" (and maybe even "uninstall") and where run is default. This way this problem would have been solved.
-Hendri. |
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|