It may be that your uninstall CA can be the same as the rollback CA, but strictly speaking an uninstall CA can assume that its counterpart install CA worked correctly if it is coded correctly and failure causes the install to fail, whereas a rollback CA may need to assume that the install CA may have only partially worked and needs to check more system state. If your code did or did not do something then it's up to you to remember what it did and the rollback CA undoes it. The rest of it appears to be about the conditions on your custom actions.
If you have CAs related specifically to feature or component uninstall then as Chris says use a component or feature condition, they are here:. So if you're still stuck, it may help to post your definitions of the CAs, in particular the conditions and types.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. MSI custom actions during uninstall vs rollback Ask Question. Asked 6 years, 4 months ago. Active 6 years, 4 months ago. Viewed 1k times. From the MSI log I can see that it's running as it should during an install and but it also runs during an uninstall : I'm checking the mode with: if! MSI s []: Running as a service.
CreateFSRegistryLink is running in non-rollback mode. A rollback custom action is 'scheduled' written to the installation script prior to the deferred custom action. Later in InstallFinalize the installation script is executed and if a failure occurs MSI walks it backwards executing the rollback actions that were scheduled.
Your question seems to be based on an assumption that rollback is related to uninstall. It is not. It occurs after a failure during a transaction. It is meant to allow you to undo what your previous action began, and there are transactions for each of install and uninstall.
MichaelUrman Exactly. I was trying to figure out, if Rollback isn't the mechanism used to determine what happens during un-install, then what is the mechanism that determines what happens during uninstall.
Given the answers I have come to the conclusion that conditions can be applied to custom actions to ensure they execute only during install or only during un-install or at other times too. Be sure to checkout: blogs. BlueMonkMN: Many people use conditions to only execute some of their actions during an "install" or "uninstall", etc. This puts the complexity in the MSI authoring. My current preference for reusable actions is to make them unconditional in the MSI and use MsiGetComponentState , MsiGetMode, and table data to determine what they need to do immediate and do it pass CustomActionData to some combination of deferred, commit, rollback.
In your case, tracking the states of a shared component might avoid the manual refcount antics. Show 1 more comment. Active Oldest Votes. It calls the function to delete the registry link. A quick tip: If your existing Windows 10 PC is running the most current version of Windows 10 and meets the minimum hardware specifications it will be able to upgrade to Windows But before that, you need to ensure that your PC is compatible.
Can I Run Windows 11 is a free tool to help you check the compatibility. Here are 3 free solutions to uninstall a problematic Windows update on Windows Tip: For those who want to uninstall drivers from Windows, here are 5 ways.
Safe Mode is a special mode that can help users troubleshoot system issues especially when the problems already occurred on the computer. It allows Windows to boot only with essential system programs and services.
Step 1: Boot into Safe Mode. Step 2 Uninstall Windows updates from Programs and Features. System Restore allows you to revert the operating system to a previous point of any stored Windows states. But you have to make sure that you have created restore points when your computer works well.
Here you will know how to create a restore point and restore Windows system manually and automatically by reading the following tip article:.
Though system restore does not affect any of your documents, pictures or other personal data, recently installed programs and drivers might be uninstalled. Step 2: Simply click on the "Trash Bin" button to uninstall the problematic update. In earlier versions of Windows 10, seccessful execution of this command does not produce any output, and the PC must be restarted manually. Run this command against an online image to remove the ability to roll back a PC to a previous installation of Windows.
Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode.
0コメント