Page 1 of 1

Order of Install commands ???

Posted: Tue Oct 14, 2008 4:24 am
by chriscraft
Set Variable PICTUREEXIST to FALSE
Does File Exist c:\\temp\\bild.bmp (get result into variable PICTUREEXIST)
if Variable PICTUREEXIST Equals TRUE
Move Local Files c:\\temp\\bild.bmp to c:\\bild.bmp
end
Delete Files c:\\temp\\*.* (when installing)

This Code cause an install Error when you running the setup because the move brings an Error that the file does't exist.

Change the Installer the Order of the commands ???

Posted: Tue Oct 14, 2008 5:17 am
by crustyzz
Check the command color in your Editor.

All the Purple ones (MSI commands) are executed when Apply Install (or Apply Uninstall) is called. Others are executed imediatly.

Posted: Thu Oct 23, 2008 3:15 am
by chriscraft
Move Local Files and Delete Files have the same color -> purple. That means for me both commands execute at the call of Apply Install or I'm wrong?
But the Error Message at install time says that the file can't move because it doesn't exist. Move Local works if the Delete Files command is removed.

delete files recoursive

Posted: Thu Oct 23, 2008 4:27 am
by ulrichard
Hi chriscraft,

you might use the "delete files recursive" command in the "direct execute" section, but make sure to call it after "apply install".
This way, you make no assumption, in which order WindowsInstaller executes your commands.
Or you could read through the documentation of WindowsInstaller to find out exactly how it performs its operations. I read only small parts of it. It's huge and complicated.

Rgds
Richard