NSIS - Close current window - nsis

I am creating an installer using NSIS. When the user clicks on the executable once again, I am proceeding with the installation again and getting a description from the user. This leads to installing multiple instances of the same application.
On this page, I am showing a cancel button to exit the setup, but I am not able to close the current installer application. If the user clicks the cancel button to abort the application, I want to close the setup.
What can I do to make the cancel button cancel the current install?

I can only imagine a reason why your Cancel button isn't working... Maybe you have defined a bogus .onUserAbort callback function? If you do an Abort inside .onUserAbort, you are preventing the user closes the installer...

Related

OfficeJS open only one dialog from ribbon - without shutdown issue

In my add-in, there are some dialogs that opened from the ribbon button (i.e. login and status).
I don't want to allow the user to open more than one dialog at a time.
When using the adding from Office for Web everything is working OK since Office for Web makes the dialog appear as a modal dialog so the user can't click the ribbon to open another one.
But when Office 365 for Windows and Mac the dialog is not modal and the user can open multiple dialogs.
I tried to create a flag in the commands.js (to tell if a window is open) file but it's not working, after a bit of investigation (on mac: defaults write com.microsoft.Excel OfficeWebAddinDeveloperExtras -bool true ) it seems like every time the user clicks the dialog button another commands window is opened so we can't store the context of if a window is open or not.
I saw this solution - to put the flag on local storage: Open only one dialog from ribbon
but the problem with this solution is that if the user exit Excel while the dialog is open (or any other unexpected scenario such as process killed or power down) next time the user will start Excel the user won't be able to open the dialog (the localStorage value will indicate that the dialog is still open).
My question(s):
Is there a robust way to prevent the user from opening multiple dialogs from the ribbon in office 365? How can I safely reset the localStorage value after a crash?
Am I missing something? Can one open the dialog in a modal manner (like in Excel for Web)?

How to trigger an event from Node.JS, where I can make a pop-up appear if the user hovers over the close button?

I'm trying to make a website where if the user hovers over the close button of a tab, I can trigger a pop-up from Node.JS. Is it possible?

Add sucsess message after uninstalling process in advanced installer

I created a setup file for my project with advanced installer but when i try to uninstall the package from control panel i don't see any dialog showing up telling me that uninstallation is a success, it's just run, uninstalling the application and then close. how can i add a dialog to show after uninstallation process?
I'm using advanced installer 12.3.1 and I'm using a custom theme if that is relevant to the question.
It's because your MSI uninstallation through Control Panel goes in Basic UI mode.
There are several ways to do what you want:
If you need simple end success or failure dialog:
you need to create a custom action which will change INSTALLUILEVEL to INSTALLUILEVEL_BASIC and INSTALLUILEVEL_ENDDIALOG. Please refer these links to find more information about it: MSDN and MSDN
The second way is a trick to hide Uninstall button from Add\Remove Programs and left only Change button. Then you need hide Change and Modify buttons from Maintenance dialog window in AdvancedInstaller (InstallShield, Orca, InstEd, etc). In this case you will receive uninstallation in Full UI mode.

How to treat a user control in an Excel Task Pane like a modal dialog?

I work on an Excel add-in product that contains a task pane that has multiple User Controls on it. We have moved our login process from a modal UserForms dialog to a WebBrowser control that is displayed within the Task Pane when the user clicks our Login ribbon button.
The desired behavior flow would be:
user clicks a Login button on the Ribbon - the Login control is shown in Task Pane
until there is a result of login (login succeeded, login failed, or user cancels login), the user could not use excel as though a modal login dialog is being displayed
Once logged in or login is cancelled, user can use Excel again.
In other words, I want the Task Pane control to work like a modal dialog.
I have the login control working great, however I do not know a way to have it simulate being modal. Once the user clicks the Login button, they are free to continue working in Excel, which we do not want.
I have been pondering some ugly solutions like trying to prevent each window within Excel from redrawing using WM_SETREDRAW with SendMessage and also tying LockWindowUpdate, but I was really hoping that someone would know a better way to accomplish what I was trying to do.
Btw, this type of functionality will not only be used for the login control or we might just go ahead and put it in a modal dialog. We are also wanting to do the same with a couple of other controls where we want the user to have to use the control before we allow them to continue in Excel.

installshield custom action cancel event from exe

I am working in installshield 2012 spring express edition.
I have created exe custom action which call exe developed in vb.net,
that exe has cancel button in it. If user Clicks on cancel button error box pops up in installshield setup (error code 1722)
I know why this error is coming but i don't want user to see this error and want to cancel the installation without showing error message to user.
Tell me if anyone need more detail.
There's a number of things at play here:
Don't use EXE custom actions. They run out of process and don't have access to the MSI handle and have a variety of other failure points. See: Integration Hurdles for EXE Custom Actions
Use WiX DTF instead to write a managed code custom action that is presented to the windows installer as a standard C++ Win32 DLL. See: WiX and DTF: Using a Custom Action to list available web sites on IIS
Your Custom action shouldn't present any UI at all. It should be publishing messages up to windows installer to be displayed on the progress dailog. If your custom action is prompting the user for information, this is wrong also. It should have done that in the UI Sequence during the user interview stage of the installation.
As you pass messages to the progress dialog, MSI will give you a return code that indicates the user has pressed the cancel button. You should then use this button to interrupt the processing in your custom action. Windows Installer will then rollback and display the Setup Interupted dialog. See: Any tips on getting the cancel button working for a deferred custom action
InstallShield Express is a very limited tool and may not be able to directly do all the authoring you need it to do. There are ways to extend it. See: Augmenting InstallShield using Windows Installer XML - Certificates
What I've shown you is the correct and proper way to do it. Anything else is suboptimal from an MSI best practices perspective.

Resources