giaviv wrote:Well, you can have it either way - what exactly are you trying to do? That will determine the order of commands.
As for your second question, I don't know how you structured your installer, but running a repair on a setup created from a template will definitely run these commands again - repair and update basically remove the first version and install it again.
Well, what I am trying to do is execute the 3 commands I gave in the order I gave it. They could execute at different points during installation, but definitely in that order.
But my question is more based on when will they actually take place since there is a mixture of purple, black, and green commands. Will they happen in order or will the black happen first then green and then purple since these are all listed consecutively before the Apply Install. Since the black is recursively deleting what the purple is trying to copy I am guessing this will lead to a problem if the black executes before the purple.
The structure of the installer... I created the script with the standard project wizard. These 3 commands were added to the region for the Initial Install / Maintenance.
Here is the core details of what I am trying to do:
- There is already an existing application originally installed with an OLD wise installer.
- The application and database files are all in the same folder program files\appname.
- This older install could be on XP based or Win 7 based systems.
- The BIG issue is with this older installation on Windows 7 units. Since it was an application without themes enabled means that all data changes made to the db tables in the program files\appname get stored in the virtual storage location c:\users\username\AppData\Local\VirtualStore\Program Files\appname. So if you simply copy the files in the program files\appname you would not get the latest data, but the ORIGINAL empty tables.
- We have updated the program with the latest version of our develepment environment and the themes are enabled as well as the data is now being installed to the $MYAPPDATDA$\APPNAME which is c:\programdata\appname on windows 7.
- So if I was doing a new install none of this would be an issue, but since I want to retain the data from the old installation I need to get the old data into the new data location before removing the old application install.
So here are the steps I am trying to take:
1) I first determine if the old application exists. This can be done via several ways, but in this case I am simply checking to see if the folder exists program files\appname and if it is Windows Vista or 7 then I check for the existence of the c:\users\username\AppData\Local\VirtualStore\Program Files\appname.
2) If I find it I then want to copy all of the data files from program files\appname to the $myappdata$\newappname.
3) if I find the virtual storage location then I want to copy all of the data files in there to $myappdata$\newappname.
4) After I copy the data to the new data location I make a backup copy to $myappdata$\appname.old
5) Now that the data has been copied I run the uninstall of the old application silently
6) Then I recursively delete the old app folder and virtual storage folder.
7) Then I remove the directory via the call DLL function.
8 Then the install continues with installing the new exe and data files. The data files are set to not overwrite if the files already exist (which they do if they had the old version).
That is pretty much the sequence I would run things if I could sequentially run everything, BUT... do things run sequentially since I have a mix of purple, black, and green commands in the above sequence. I want to make sure I understand how this gets processed and in what order does it really attempt to happen. I can provide the script if needed.
If what I understand is correct then the sequence above will not run in that order. The commands that are black would run first and then the green and then the purple in the end. If that is the case then I need to try and make the black and green commands happen AFTER the apply install.
Then all this leads to the second question about NOT wanting steps 1 through 7 to run in the maintenance / repair process. How can I do this. Can you even run any of the purple commands so they are not part of the maintenance? Ultimately do I have to have some other method to doing steps 1 through 7 so it isn't run during the maintenance / repair.
Just trying to clear up some confusion in my mind about this.
Thanks for your help,
Greg