Given the case that a user is presented a modal dialog that displays an installation process (or something similar).
If the process would normally take a few seconds but can potentially take longer, should I offer a "Cancel" button to give the user full control? 

I've seen installers that disable the Cancel button and others that can do a rollback after Cancel is clicked. But what if one does not have the option of a full rollback? Should I ...

* trap the user in the dialog until the process is completed or a timeout is reached
* offer the Cancel button anyways, with the drawback of possibly generating data garbage or an invalid installation
['https://ux.stackexchange.com/questions/79016', 'https://ux.stackexchange.com', 'https://ux.stackexchange.com/users/19337/']
It very much depends on the type of your application the operation it is doing. Ideally user should always be in control, but there are situations when you will want to keep control when you are making critical changes.

Firstly, you must inform user that a following operation might take X amount of time and that she may not be able to use the system. 

![enter image description here](https://i.stack.imgur.com/mYfVN.jpg)

When you tell such a thing, this puts a certain amount of stress on the user. You should try your best to alleviate that stress. Best way is to show the time left, and what exactly is the action you are performing. While doing so, your messages should avoid jargon and meet the target audience's vocabulary.

A windows update may not be an precise example for this situation but it does tell you how Microsoft handled it in Windows 7.

![enter image description here](https://i.stack.imgur.com/jqnOo.png)

Although here Windows can not estimate the time required, it tries to break up the operation in steps so that user has some tangible progress to hold on to. This is very essential for many reasons. I have seen vague progress bars which just run to oblivion without offering any solace to users. You must avoid that.

*Considering your use case, after user feedback, you might want to push the message of delay when the operation does not complete in threshold time. I agree that users would already have started the process, but if most of the times the operation is going to take few seconds, there is no reason to always show a message that they can't use the system. After a few seconds you can pop up and mention this seems to be taking longer than usual. You might need a users opinion on this.*
I believe the correct action would be to explain to the user before going through with the irreversible action, that the action is irreversible.

`"Doing this is permanent / This action is un-doable / You can not roll back this change" -> OK /cancel` Or something like that depending on what kind of users you have and what jargon they do or don't know.

Don't trap a user on a load screen if avoidable. If the load time really is so high that you have to expect the user to want to cancel out of it; then we can now acknowledge that the load time is very high. So let's make the user prepared for this long, irreversible load time and at least give them the option to start it in their own time.

Presenting junk data would only be okay if CRUD'ing / manipulating data was normal/easy/expected/not a hassel. But it usually is considering we as UX designers should value every single click we cost on the user.