08-04-2002, 04:53 AM
I created my package and setup program.
I distributed it to some users.
Now I made some adjustments and wanted to
release a new version of the program.
I created a new packege... set program... the works.
But now there's a problem !!!
When they install the new package without
uninstalling the previouse everything is adjusted
except the most important part... the executable...
How can I make this work?
08-04-2002, 06:19 AM
Well, there's no easy solution for this. One may be to adjust your PDW Setup program (written in VB!) to make it check for previous instance of your EXE. This should be done somewhere during the preparation for the instalation of the program, so the Setup program will know where to look for the prev. exe file and delete it (assuming, that changes made to the new exe aren't that segnificant) or somehow run the uninstall facillity for the installed App. If so, you should notify the user that he/she must let the installer do the uninstalling and then run the setup again.
The problem with this might be, if your program use any sort of data storage (DB,...). In this case, it would be wise, that you check your DBs as "Shared files", so they don't get deleted, when the program is being uninstalled.
Hope that make sence...
08-04-2002, 08:32 AM
but let me ask a different question.
Can I put some of my own code in
the setup.exe? If that's possible I can
just delete the file before the setup-program
tries to overwrite it.
08-04-2002, 09:28 AM
Yes! There's a source code for the Setup.exe in your VB directory.
You can alter that as you wish and then compile it.
Just don't forget to backup the original Setup files and exe just in case, you mash something up.
This is commonly known as Custom setup.
You can find lots of info on vb-world.
08-04-2002, 10:16 AM
You will be making a big mistake if you try to use a P&DW package
to install a new version without deleting the old version first. It
just wasn't designed for in and it will leave the registry in a mess.
08-04-2002, 10:57 AM
What if I add some code to detect a previous
version and refuse to install the new one.
Just give a message that the user has to install
the old one first...
Any ideas on how to check for existing versions.
Or do I just test to see if the executable exists?
08-04-2002, 11:04 AM
If all you are doing is modifying the EXE and aren't adding any
new controls or other ActiveX components, all you have to do is
copy the EXE over the top of the old one. If you are making any
of those other changes, then you should check if the program is
installed. I know it can be done by looking in the registry, but I
haven't had to do it before, so I don't have any example. You
might want to look into another installer package (like Inno) which
might be able to do an upgrade package for an existing install.