Error 1721, using "execute program from installation"
Hi folks!
I'm creating an .msi that will perform a major upgrade of an application. But I need to do some actions (i.e backup some old files) before the old files are being removed. So I'm using the "execute program from installation" option and have created an .cmd that I have in my .msi (i.e the binary table). The problem is that I keep getting Windows Installer Error 1721 and the return code 3 (which, if I have read the manual correctly means problem with the "location").
I'm getting a bit frustrated since one of the ideas of "execute program from installation" is the benefit of calling a temporary program (it only exists during the installation) without having to know where the program resides. I have another .msi that is performing like a charm but with the difference that the temporary files that are being used are stored in a table called ISSetupFile. That table doesn't exist in my faulty .msi, but since I'm using another approach on the faulty one I see no reason for having a ISSetupFile table.
The program being used for creating the .msi is Wise but we used Installshield Developer a short amount of time for some of our .msi.
Thankful for any help.
/Daniel
I'm creating an .msi that will perform a major upgrade of an application. But I need to do some actions (i.e backup some old files) before the old files are being removed. So I'm using the "execute program from installation" option and have created an .cmd that I have in my .msi (i.e the binary table). The problem is that I keep getting Windows Installer Error 1721 and the return code 3 (which, if I have read the manual correctly means problem with the "location").
I'm getting a bit frustrated since one of the ideas of "execute program from installation" is the benefit of calling a temporary program (it only exists during the installation) without having to know where the program resides. I have another .msi that is performing like a charm but with the difference that the temporary files that are being used are stored in a table called ISSetupFile. That table doesn't exist in my faulty .msi, but since I'm using another approach on the faulty one I see no reason for having a ISSetupFile table.
The program being used for creating the .msi is Wise but we used Installshield Developer a short amount of time for some of our .msi.
Thankful for any help.
/Daniel
0 Comments
[ + ] Show comments
Answers (14)
Please log in to answer
Posted by:
slb
18 years ago
Posted by:
timmsie
18 years ago
Posted by:
daxelsso
18 years ago
Posted by:
timmsie
18 years ago
It'll be much better for you to use the MoveFile table. It couldn't be easier with wise.
From "installation expert" click the "files" page and select "Move files" from the "Operations" menu (bottom right pane)
The MoveFiles action performs the move so you can check it's sequencing in the execute immediate script
Could the action be failing because the machine you are testing on doesn't have a writable D:\ drive
From "installation expert" click the "files" page and select "Move files" from the "Operations" menu (bottom right pane)
The MoveFiles action performs the move so you can check it's sequencing in the execute immediate script
Could the action be failing because the machine you are testing on doesn't have a writable D:\ drive
Posted by:
slb
18 years ago
Posted by:
slb
18 years ago
Posted by:
brenthunter2005
18 years ago
Posted by:
slb
18 years ago
Thank you MR B HUNTER,
If the query goes like this...
I have an msi which during installation copies a file to a temp location and then depending on one custom action the files will be copied/ not copied from temp location..
In this case, if i had used a custom action before install finalize in Execute immediate mode, will this function properly???
Thanks in advance.
If the query goes like this...
I have an msi which during installation copies a file to a temp location and then depending on one custom action the files will be copied/ not copied from temp location..
In this case, if i had used a custom action before install finalize in Execute immediate mode, will this function properly???
Thanks in advance.
Posted by:
brenthunter2005
18 years ago
Posted by:
slb
18 years ago
The custom action is a vbscript.. very simple one using FSO.File copy command.
But as i understand only the commit action of the msi takes place only after the installfinalize custom action?? Before this it will say that the files are not present in the location that you refer to....
[sm=rolleyes.gif]
Thank you for your response to explain to me & all more about custom actions.
But as i understand only the commit action of the msi takes place only after the installfinalize custom action?? Before this it will say that the files are not present in the location that you refer to....
[sm=rolleyes.gif]
Thank you for your response to explain to me & all more about custom actions.
Posted by:
brenthunter2005
18 years ago
You can please this vbscript custom action at the end of the sequence (ie: after the InstallFinalize action). By putting the custom action right at the end, it will run and copy the files at the very end of the installation.
You may want to copy the files as soon as they are installed by the MSI. (A good example of a reason why you may want to do this is because you have configured the MSI to start a service which relies on these files being copied.)
To do this you need the custom action to run directly after the InstallFiles action which is inside of the InstallInitalize and InstallFinalize actions. If you don't configure your vbscript custom action to run in the deferred sequence then the vbscript will not be able to find the files to copy because they haven't even been installed yet.
Remember that the MSI runs through the sequence tables twice. One to gather and create the script, and the second time to actually do it.
I know I haven't explained this clearly, but you can read up more about it in the Windows Installer SDK (aka 'the bible').
You may want to copy the files as soon as they are installed by the MSI. (A good example of a reason why you may want to do this is because you have configured the MSI to start a service which relies on these files being copied.)
To do this you need the custom action to run directly after the InstallFiles action which is inside of the InstallInitalize and InstallFinalize actions. If you don't configure your vbscript custom action to run in the deferred sequence then the vbscript will not be able to find the files to copy because they haven't even been installed yet.
Remember that the MSI runs through the sequence tables twice. One to gather and create the script, and the second time to actually do it.
I know I haven't explained this clearly, but you can read up more about it in the Windows Installer SDK (aka 'the bible').
Posted by:
timmsie
18 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.