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)
Please log in to answer
Posted by:
anonymous_9363
15 years ago
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.
Download the WI SDK and refer to 'Rollback Custom Actions' which you'll find in MSI45.CHM.
Posted by:
elgwhoppo
15 years ago
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.
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
Posted by:
birajendu
15 years ago
Posted by:
anonymous_9363
15 years ago
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
Posted by:
birajendu
15 years ago
Posted by:
birajendu
15 years ago
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
Posted by:
birajendu
15 years ago
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?
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
Posted by:
birajendu
15 years ago
Posted by:
anonymous_9363
15 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.