/build/static/layout/Breadcrumb_cap_w.png

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

0 Comments   [ + ] Show comments

Answers (14)

Posted by: slb 18 years ago
Purple Belt
0
Could you please post your cmd file that you are trying to run?? Might be the problem is there in the way that the files and folders you are trying to access for your function.

HTH
Posted by: timmsie 18 years ago
Fourth Degree Brown Belt
0
If you are only moving files. You could use the "Movefile" table. Then you won't have to worry about custom actions
Posted by: daxelsso 18 years ago
Yellow Belt
0
Hi!

Since I don't know how to post a file on this forum the solution was to copy the code.

if exist D:\Tradkop\DB\TRAKOP.MDB copy D:\Tradkop\DB\TRAKOP.MDB D:\TRAKOP.MDB /Y
Posted by: timmsie 18 years ago
Fourth Degree Brown Belt
0
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
Posted by: slb 18 years ago
Purple Belt
0
Have you placed your custom action after install finalize custom action?? Before this action i think the path would not be resolved if you have put the file in your msi tables...

Hope this helps
Posted by: brenthunter2005 18 years ago
Fifth Degree Brown Belt
0
@slb - don't you mean the CostFinalize action?
Posted by: slb 18 years ago
Purple Belt
0
MR B HUNTER ,
I meant InstallFinalize action in ExecuteImmediate mode.. Does this make sense??
Or i am completely wrong??[sm=rolleyes.gif]
Posted by: brenthunter2005 18 years ago
Fifth Degree Brown Belt
0
Hello slb,

Directory resolution is performed during the CostFinalize action, which is in the InstallExecuteSequence table.

Regards,
Brent.
Posted by: slb 18 years ago
Purple Belt
0
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.
Posted by: brenthunter2005 18 years ago
Fifth Degree Brown Belt
0
What type of custom action is it? Is it a vbscript? If so, can you please paste the code.

You custom action (whatever it is) needs to go after the InstallFiles action. Because this action exists in the InstallExecute sequence, you will need to make it a deferred action.
Posted by: slb 18 years ago
Purple Belt
0
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.
Posted by: brenthunter2005 18 years ago
Fifth Degree Brown Belt
0
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').
Posted by: timmsie 18 years ago
Fourth Degree Brown Belt
0
But why can't you use the "Movefile" table. If you need to change the sequence of when they are moved then just move the "MoveFiles" action around.
Posted by: brenthunter2005 18 years ago
Fifth Degree Brown Belt
0
I do agree with timmsie.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ