Perhaps my title should be: InstallShield Profesional 2010: How to write your own InstallScript to handle new installs, update (or upgrade) installs and uninstalls (removal).
However, *bleh* is more like the thing I say after the word InstallShield, after spending 4 days getting it to work.
The real reason why I dislike it, isn’t the program itself, it’s mostly the lack of proper documentation. I found myself learning how to add a new property and value, (by using right click) instead of finding what %&*#@ values I can include!
Anyway, to help out those who might has less hair now, I’ll be listing parts of my InstallScript Rule and later a guide on how to setup an MSI based installation that saves the config to xml for the app to use (which can be configured during installation) and reads from that xml during update installations. (stay close for that post).
The most useful thing I found online (from FlexeraSoftware) was this image:

Can also be found here.
Here’s a snippet of my script, which should help you get started. For some reason, mine never had any “default” scripts or “samples” so I had to lose some hair getting there. (not that I have plenty left).
//========= ALWAYS RUN ========
//this is called always, first
function OnBegin()
begin
//call 1st
end;
//this is always called, third
function OnMoving()
begin
//call 3rd
end;
//this is always called, fourth
function OnMoved()
begin
//call 4th
end;
//this is always called, last
function OnEnd()
begin
//call last
end;
//========= NEW INSTALL =======
//this is called when it's a new install, second
function OnFirstUIBefore()
begin
//call 2nd
MsiSetProperty(ISMSI_HANDLE,"APP_STATE","NEW");
NewInstall();
end;
//this is called when it's a new install, fifth
function OnFirstUIAfter()
begin
EndInstall();
end;
//========= UNINSTALL ========
//this is called when it's a uninstall, second
function OnMaintUIBefore()
begin
MsiSetProperty(ISMSI_HANDLE,"APP_STATE","REMOVE");
GetRegistryInstalledValue();
MaintInstall();
end;
//this is called when it's a uninstall, fifth
function OnMaintUIAfter()
begin
EndUninstall();
end;
//========= UPGRADE ===========
//this is called when it's a upgrade install, second
function OnResumeUIBefore()
begin
MsiSetProperty(ISMSI_HANDLE,"APP_STATE","UPDATE");
GetRegistryInstalledValue();
UpgradeInstall();
end;
//this is called when it's a upgrade install, fifth
function OnResumeUIAfter()
begin
EndUpgrade();
end;
i wrote this like ages ago and never posted it. ages, meaning ‘Last edited by admin on November 9, 2010 at 11:46 am’.
so i decided to go ahead and post it anyways. yes, and not edit it. thank you for saying that loud.