/build/static/layout/Breadcrumb_cap_w.png

How to Call Rollback custom action

Hi I have a windows installer deployment project. I which i have adde a custom Install action fucnction. I the custom install action i am checking for some system capabilities. So in certain conditions i need to roll back the installation process. can any body give some idea how to invoke custom rollback action call from custom install action function?

0 Comments   [ + ] Show comments

Answers (14)

Posted by: anonymous_9363 15 years ago
Red Belt
0
What do you mean by rollback? The Windows Installer (WI) engine handles rollback by itself. If you want to un-do some action which was created by you, you need to build a script to perform the un-do operation and then set the attribute which determines that the script should run in a rollback scenario only. From memory, I think you need to add 3328 to the CA's 'Type'. Your authoring tool may provide a UI to enable that option more easily. You must also ensure that the rollback action occurs before its associated install action in the installation sequence.

Download the WI SDK and refer to 'Rollback Custom Actions' which you'll find in MSI45.CHM.
Posted by: elgwhoppo 15 years ago
Senior Purple Belt
0
Why don't you just use Launch Conditions? Instead of rolling back, it will just fail the installation at the LaunchConditions sequence. For example:

Condition:
(Not Version9X=400) And (Not Version9X=410) And (Not Version9X=490) And (Not VersionNT=400)

Description:
[ProductName] requires that your computer is running Windows 2000 or Windows XP or Windows 2003 Server

You can also use system search to search for particular files and registry entries, then build conditions from those variables.
Posted by: birajendu 15 years ago
Senior Yellow Belt
0
Some how I managed to rollback some all my custom action i did in install custom action, the only thing i need to do is to remove the application name from add/remove program list. Do you have any idea how to remove that using C++ code?
Posted by: birajendu 15 years ago
Senior Yellow Belt
0
Here actually i am checking wether some windows service is runnig or not? so i dont thig that can be acheived by lunch conditions check.
Posted by: anonymous_9363 15 years ago
Red Belt
0
Do you have any idea how to remove that using C++ code? ARP entries are read from the registry, specifically HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\[ProductCode]. I presume, if you're proficient at C++, that you will have a registry-handling class. However, if you were thinking that you'd need to remove the entry for your product, you don't, because the Windows installer engine will do that for you when the product is uninstalled.

I figure you'd also have a service-handling class, too. Thus you could incorporate both classes into a DLL and call the functions you need from that via Custom Action(s).
Posted by: elgwhoppo 15 years ago
Senior Purple Belt
0
ORIGINAL: birajendu

Here actually i am checking wether some windows service is runnig or not? so i dont thig that can be acheived by lunch conditions check.


So you are trying to ensure that this product is not installed when a particular service is running, correct? Is that the end goal?
Posted by: birajendu 15 years ago
Senior Yellow Belt
0
yes, i am trying to check that a perticular service is running or not?
Posted by: birajendu 15 years ago
Senior Yellow Belt
0
I figure you'd also have a service-handling class, too. Thus you could incorporate both classes into a DLL and call the functions you need from that via Custom Action(s).

I could not understand what do you mean by saying this? can you please explain bit clearly.
No i dont want to delete the ARP entry by C++, i would like to call uninstall process some how.
Posted by: anonymous_9363 15 years ago
Red Belt
0
I could not understand what do you mean by saying this? can you please explain bit clearly.
No i dont want to delete the ARP entry by C++, i would like to call uninstall process some how.
So what was post #4 all about, then? As Duncan Ballantyne might say: "Ahm oot."
Posted by: birajendu 15 years ago
Senior Yellow Belt
0
Sorry, I confused you.
I mean to say idont want to delete that ARP entry from registry, rather i need to initialize the uninstall process. As you described in your previous reply that uninstall will delete the ARP entry automatically.
But again i ran in to a issue i am not able to initialize uninstall process while the program control is in install custom action?
Posted by: anonymous_9363 15 years ago
Red Belt
0
If uninstalling involves running an MSI, it won't work. You can only execute one MSI at a time.
Posted by: birajendu 15 years ago
Senior Yellow Belt
0
yes, you are right, thats where i stuck, i need to find a work around for this... if you have any idea will be very much helpfull for me.
Posted by: anonymous_9363 15 years ago
Red Belt
0
This is like pulling teeth....

Let's try and clarify things.

What I believe you want to do is to check if a service is running. If it is, you want to uninstall the product that installed it BEFORE you run your install. Is that right?
Posted by: birajendu 15 years ago
Senior Yellow Belt
0
Yes, exactly some thing like this..
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ