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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

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
Answered 01/23/2006 by: slb
Purple Belt

Please log in to comment
0
If you are only moving files. You could use the "Movefile" table. Then you won't have to worry about custom actions
Answered 01/23/2006 by: timmsie
Fourth Degree Brown Belt

Please log in to comment
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
Answered 01/23/2006 by: daxelsso
Yellow Belt

Please log in to comment
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
Answered 01/23/2006 by: timmsie
Fourth Degree Brown Belt

Please log in to comment
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
Answered 01/24/2006 by: slb
Purple Belt

Please log in to comment
0
@slb - don't you mean the CostFinalize action?
Answered 01/24/2006 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
0
MR B HUNTER ,
I meant InstallFinalize action in ExecuteImmediate mode.. Does this make sense??
Or i am completely wrong??[sm=rolleyes.gif]
Answered 01/24/2006 by: slb
Purple Belt

Please log in to comment
0
Hello slb,

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

Regards,
Brent.
Answered 01/24/2006 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
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.
Answered 01/24/2006 by: slb
Purple Belt

Please log in to comment
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.
Answered 01/24/2006 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
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.
Answered 01/24/2006 by: slb
Purple Belt

Please log in to comment
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').
Answered 01/24/2006 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
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.
Answered 01/24/2006 by: timmsie
Fourth Degree Brown Belt

Please log in to comment
0
I do agree with timmsie.
Answered 01/24/2006 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
Answer this question or Comment on this question for clarity