Order of Install commands ???

Got a problem you cannot solve? Try here.
Post Reply
chriscraft
Posts: 3
Joined: Tue Oct 14, 2008 2:43 am

Order of Install commands ???

Post 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 ???
crustyzz
Posts: 28
Joined: Thu Mar 16, 2006 4:18 am
Location: France

Post 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.
chriscraft
Posts: 3
Joined: Tue Oct 14, 2008 2:43 am

Post 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.
ulrichard
Posts: 150
Joined: Thu Dec 27, 2007 5:45 am
Location: Switzerland
Contact:

delete files recoursive

Post 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
Post Reply