Cancel and roll back during NSIs installation (1) -- Current Situation

Source: Internet
Author: User

IfGoogleSearch on"NSIs cancel install"Some people will find the same question. Some slave2003I have been asking this question in years. What's strange is thatNSIsNo built-in support for uninstallation is provided. On the installation page, all buttons are disabled. In addition, reading replies from Forum developers does not mean to add this function in the near future.

However, the problem cannot be solved.NSIsHalfway through development, it is found that the installation cannot be simply canceled or automatically rolled back.NSIsDeveloped.InnoAndMsiBoth are built-in support for cancellation and rollback, hopeNSIsYou can also add support for this function. However, before the developer completes this function, there must be a temporary solution. UnfortunatelyGoogleAfter searching for a long time, you can only find all kinds of questions without a decent answer.

The following summarizes the existing resources on the Internet.

 

Enable cancel button during install?

Afrow UKReply:"You 'd need to modify nsisunz to use an asynchronous thread and include a cancel flag."NsisunzWhat is it? I don't know. I don't need to worry about it anymore.

 

Cancel Installation

Red wineReply:"No possible to enable the cancel button on page instfiles pre function, because if you do so, the nsisunz plugin refuses to load the ZIP file."Okay, connectEnable the cancel buttonNone of them work?

 

Cancelling the installation process as it happens

Darthvader Given a question Official patch It looks good, but it will soon show up-it's too old. Kichik Reply:" Abortion isn' t the same as the file open problem dialog. those originate from two different threads. the naive implementation wowould actually only make it possible to abort in between file commands and not while extracting a big file. "It doesn't seem easy to do. This Kichik Yes NSIs Developers, according to his statement, can Abort , You can only press File Number of commands to cancel. That is to say, if you used File *.* To compress the file. Now you can change it to a few files to be packaged. FileCommand to detect whether to cancel the installation. It's a solution, but it's also disgusting. Image Presentation Wizou Reply:" I was just saying that rather than waiting 6 + months for a new "Abort" feature fully implemented, that cocould be nice to start by having a quick implementation that wocould be already enough to answer the needs of 90% of NSIs users. "Last Dmut He used Multi-volume_Distribution The plug-in implements this function, but it does not specifically describe how to implement it ......

 

Allow user to cancel during install?

KichikTo put it bluntly,"You can't enableCancelButton yet. It was originally planned for V2 but it looks like it will have to wait for 2.1."Fortunately, that is2003But now it should have changed? I also wantV2.1Add this function. Now all2.44No.

 

How to enable the cancel button during install

Cancelling during mui_page_instfiles

Here we provideInstfilesCancel button on the pageEnableTo cancel the installation. If this meets your needs, you can use it. But you have to write a lot on your own.Code. Because canceling the installation is not the end of the process. You need to delete the installed items, as if you have never run the installation.ProgramSame. However, most of the current installation packages do not do this, and you need to wipe it.

 

How to enable a Cancel button on a uninstall Mui page

Poor person. No one answered ......

 

Problem with the umui cancel button not stopping the install process properly

Do not pressNSIsAlways have to pay back.CancelThe button can be enabled, but when the dialog box pops up, ask the user if they really wantCancelThe subsequent process continues. If the user clicks slowly, the user does not wait.OKThe installation is complete! Developer sweat.

 

These are only part of the questions asked by netizens. Remember that there is another post that provides all the code to enable the cancel button. I also encountered the same problem as the last post above. However, the post cannot be searched.

 

Don't knowNSIsThe author is studying what advanced features require such a wide range of features to be removed, and the features that both competitors have achieved have gone through6The year has not been completed yet.

 

the author's project also encountered such problems. We need to cancel the installation, but the background installation thread cannot be stopped. Previous Article production NSIs command line window output plug-in , so theoretically, you can do anything you want to do. In the next article, we will implement a thread-controlled plug-in. Use a plug-in to stop the background installation thread and prepare for canceling the installation function.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.