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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

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.
Answered 07/27/2009 by: VBScab
Red Belt

Please log in to comment
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.
Answered 07/27/2009 by: elgwhoppo
Senior Purple Belt

Please log in to comment
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?
Answered 07/27/2009 by: birajendu
Senior Yellow Belt

Please log in to comment
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.
Answered 07/27/2009 by: birajendu
Senior Yellow Belt

Please log in to comment
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).
Answered 07/28/2009 by: VBScab
Red Belt

Please log in to comment
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?
Answered 07/28/2009 by: elgwhoppo
Senior Purple Belt

Please log in to comment
0
yes, i am trying to check that a perticular service is running or not?
Answered 07/28/2009 by: birajendu
Senior Yellow Belt

Please log in to comment
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.
Answered 07/28/2009 by: birajendu
Senior Yellow Belt

Please log in to comment
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."
Answered 07/29/2009 by: VBScab
Red Belt

Please log in to comment
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?
Answered 07/29/2009 by: birajendu
Senior Yellow Belt

Please log in to comment
0
If uninstalling involves running an MSI, it won't work. You can only execute one MSI at a time.
Answered 07/30/2009 by: VBScab
Red Belt

Please log in to comment
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.
Answered 07/30/2009 by: birajendu
Senior Yellow Belt

Please log in to comment
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?
Answered 07/30/2009 by: VBScab
Red Belt

Please log in to comment
0
Yes, exactly some thing like this..
Answered 07/30/2009 by: birajendu
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity