Domocha’s Weblog


Windows Installer Resiliency
December 11, 2008, 5:51 am
Filed under: Uncategorized

Environment: Deployment Project – Framework 2.0

Case:

When you build a deployment project to create an installer, there are some files included inside it. And when you run the installer it will create the file on specified installation folder.

And here’s the thing…when the user rename or remove the files, then the application will reinstall itself to recover the file, this is what usually called as resiliency. This is good, but what if the file is not too important or you deliberately let the user to change or remove it? yes, everytime you rename or delete the files, the application will reinstall itself, and the files are recovered.

Resiliency is a program’s ability to recover gracefully from situations in which a vital component is missing.[http://support.microsoft.com/kb/290997]

Solution:

I have tried to set the file property – Vital – into false, but it was not working, the application still reinstall itself, and finally I reach the conclusion that it can not be done by configuring the deployment project, and look for another workaround.

And later I found the solution which is by editing the .msi file (the installer file), means after finish building the deployment project. By using the msi editor ORCA:

  • Find the specified (which you intend to make it not vital) files inside the Files Table, and look for its component id.
  • And then find the similar component id inside the Component Table, and look for its key path.
  • Clear its key path.

after that save it…remember don’t try to save it by “save as” just use “save”, when you save it by “save as” it will create smaller .msi file which is not similar with the original file and it could trigger error 2356 which means can not locate cab, at least for this version of ORCA 3.1.4000.1830.

Try to install by using the new .msi file, and that’s it ^__^


6 Comments so far
Leave a comment

is this what you called ‘mainan”?
you tricked me huaaaaa

Comment by TamaGO

@tamago : this is “mainan” for him… :D

Comment by sentinelcore

Weird eh…. meddling with Vital properties…

Heh yang gini “mainan” ?!!! may project gw ga ?

Comment by Eru

OPOOO KIEEE???????!!!!!!!

sub-title:
WHATT’S THISSS???!!?!

Comment by arenaling

whokzzz….. kirain domochan cewe, imut22 gitu, mungil, lucu kaya sakura tsubasa chronicle ato sakura cardcaptor…

eh taunya… JENG JENG…..amit22… ginian maenan…. ~pusing~

salam kenal ya mas :D

Comment by nairasmile

beuhhh berat bahasannya

‘kleyeng kleyeng’

Comment by ansella




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s



Follow

Get every new post delivered to your Inbox.