The following applications should be closed prompt

Got a problem you cannot solve? Try here.
jkrasky
Posts: 40
Joined: Mon Dec 29, 2008 10:46 am

The following applications should be closed prompt

Postby jkrasky » Wed Mar 01, 2017 10:32 am

Hello,

Prior to upgrading to InstallAware X6, my installer would automatically and silently stop and remove two services on uninstall. Now I receive a prompt:

"The following applications should be closed before continuing the install" that the user has to answer. Is there a way to turn this prompt off? The services need to be stopped and removed so the prompt introduces the possibility of someone saying no and a reboot potentially being needed for no reason.

Thanks!
Last edited by jkrasky on Wed Mar 01, 2017 3:45 pm, edited 1 time in total.

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: The following applications should be closed prompt

Postby FrancescoT » Wed Mar 01, 2017 2:24 pm

Dear Jkrasky,

I am not quite sure if that prompt is directly handled by the setup engine.

Do you have any chance to post a sreen-shot for this behavior?

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

jkrasky
Posts: 40
Joined: Mon Dec 29, 2008 10:46 am

Re: The following applications should be closed prompt

Postby jkrasky » Wed Mar 01, 2017 3:44 pm

Hello FrancescoT,

Attached is a screenshot. We have been building setups in InstallAware since probably version 10 and we've never seen this prompt with the same setup file. It appeared only after building on InstallAware X6 so I assumed it had to be a change in the new version.
Untitled-1.jpg
Untitled-1.jpg (36.49 KiB) Viewed 12402 times

Sheri_Steeves
Posts: 124
Joined: Mon Oct 22, 2012 2:14 pm

Re: The following applications should be closed prompt

Postby Sheri_Steeves » Thu Mar 02, 2017 9:14 am

Hello,

I'm getting the same prompt for three of my services that are still running when I run my setup to update the existing install to the latest version, which was built with X6.

These services are marked with stop and delete service on uninstall.

As Jkrasky said, this does not appear in my other setups built with X5 and prior.

My test scenario:

  • Install my product version 3.0.009 (built with X3) and run it so that the services are started. Stop main program. The services stay running (expected behaviour).
  • Update to the next version 3.0.010 (built with X5), no prompt. Run program so that the services are started, then stop main program. The services stay running (expected behaviour).
  • Update to the next version 3.0.011 (built with X6), prompt appears. Doesn't seem to affect the upgrade as the services are removed and then added back into the Services panel.

What can we do about the dialog - my clients may find it disconcerting.


Thanks,

Sheri

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: The following applications should be closed prompt

Postby FrancescoT » Thu Mar 02, 2017 2:17 pm

Dear Users,

this is the new Restart Manager support in the new InstallAware X6. Clicking No on the dialog shown would fall back to default InstallAware X5 and earlier behavior (which would actually require a reboot). Clicking Yes would attempt to prevent a reboot by using the Restart Manager.

Clicking Cancel would abort the installation.

Currently, it's not possible to make this behavior optional.

NOTE!
When using the Windows Installer engine, the Restart Manager is invoked automatically by Windows Installer.


Hope this helps you.
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

jkrasky
Posts: 40
Joined: Mon Dec 29, 2008 10:46 am

Re: The following applications should be closed prompt

Postby jkrasky » Thu Mar 02, 2017 4:51 pm

Hello FrancescoT,

What you're saying is not accurate in my experience and I can prove it with InstallAware X5 built setups out of the same installer project. When an upgrade is performed, my installer removed the product and installs the new version. If I build the setup in InstallAware X5 and execute it, it stops the services and uninstalls them (the option is stop and uninstall on remove). It then reinstalls the new version and no reboot is necessary.

If I build the exact same setup with InstallAware X6, they get the prompt and have to respond to it. If they respond no, the services are not stopped which you're correct could lead to a reboot. However, this is not the behavior in InstallAware X5 and earlier with the service control set to "stop and delete the service on uninstall." If I have that option selected, why would I want to give someone the option to not stop the services? The option specifically says to stop them. This new behavior can't be what is intended, it doesn't make sense.

Are there plans to have an option to make this behave as it always has in the past? If not, I will likely have to stay on X5 which is not really a long-term solution.

Thanks!

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: The following applications should be closed prompt

Postby FrancescoT » Fri Mar 03, 2017 5:18 am

Dear Jkrasky,

I suppose instead that you didn't read my previous reply accurately.

I said;

"this is the new Restart Manager support in the new InstallAware X6."

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

jkrasky
Posts: 40
Joined: Mon Dec 29, 2008 10:46 am

Re: The following applications should be closed prompt

Postby jkrasky » Fri Mar 03, 2017 10:17 am

Hello FrancescoT,

Actually, I did read your response accurately and carefully. You didn't answer my question posed in my last post. What I am saying is the way that you have implemented the restart manager in InstallAware X6 doesn't make logical sense with my configuration.

Let's walk through this:

1. The InstallAware project has two entries under Services for controlling two services on uninstall.
2. The option is set to "Stop and delete the service on uninstall."
3. You run the setup built in InstallAware X6 and it prompts the user to stop the service, giving them the option to not do what is defined in Step 2, therefore creating the possibility of a rebooting being needed when it wasn't needed before.

My question was: Why would InstallAware implement this change which in effect makes the installer not do what it's instructed to do? Are you able to at least acknowledge that providing a prompt which allows the user to not stop the service on removal when the installer is configured and instructed to do so doesn't make sense? I fully understand if there is a service that should be stopped, prompting is a nice addition and makes sense. My installer is configured to stop and delete the service properly.

Thanks!

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: The following applications should be closed prompt

Postby FrancescoT » Mon Mar 06, 2017 2:36 pm

Dear Jkrasky,

the "Control Service" command is a Windows Installer Command (PURPLE COMMAND) and as any other Windows Installer Command, it's not executed immediately, but deferred to Apply Install execution.

Due of this, when the Install process effectively starts (when Apply Install is just started) the Service has not been stopped/deleted yet and this explains why the Windows Installer Engine founds the service active.

I did get any chance to verify this yet, but probably, explicitly forcing the service to stop it may prevent the Restart Manager prompt.

In other words, in your main script and just before the Apply Install statement, you may try to add the following code;

Code: Select all

    ...
    Set Variable NATIVE_ENGINE to TRUE
    Control Service MY_SERVICE: stop on uninstall [wait for completion]
    Set Variable NATIVE_ENGINE to FALSE
    ...

The above code temporarily switches the IA Native Engine and this causes the immediate stop of the service. With the above approach, the "Control Service" command will be not included with the generated MSI database and you can leave your other call to "Control Service" exactly as it is.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Sheri_Steeves
Posts: 124
Joined: Mon Oct 22, 2012 2:14 pm

Re: The following applications should be closed prompt

Postby Sheri_Steeves » Tue Mar 07, 2017 10:04 am

Francesco,

This does stop the service, but displays a prompt when attempting to stop a service is not started so is not a true fix (for me anyway).

In my case, some of my services may still be running, and some not, depending on what the user has done before the attempt to uninstall/upgrade.

I agree with jkrasky's response of the new behaviour giving the users the option to not stop the service when they shouldn't have that control as being wrong. I've asked for the service to be stopped and deleted as part of the uninstall; if it fails at that point, then yes, then tell the user that a reboot is required. This new dialog gives the user the chance to mess it up from the start.

I also think it makes my install look sloppy, like I forgot to manage our own components.

I have been able to work around this simply because I happen to have as part of my program a utility that I can use to manually stop the services before I call the uninstall. I still get the message when upgrading from an older version but I can control this going forward - not an ideal solution but it will work for now.

Sheri

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: The following applications should be closed prompt

Postby FrancescoT » Tue Mar 07, 2017 10:26 am

Dear Sheri,

many thanks for reporting your feedback.

At any rate and regarding the code I posted previously, I missed to include a "Check Service" call and this in order to execute the "Control Service" command conditionally.

The "Check Service" command checks for a running service on the local system, or a system on the network.

So my previous code should be replaced as follow;

Code: Select all

...
Set Variable MY_SERVICE to <...Name of service...>
Set Variable MY_SERVICE_STATE to RUNNING
Check Service State for $MY_SERVICE$ (write result into variable MY_SERVICE_STATE)
if Variable MY_SERVICE_STATE Equals RUNNING
  Set Variable NATIVE_ENGINE to TRUE
  Control Service $MY_SERVICE$: stop on uninstall [wait for completion]
  Set Variable NATIVE_ENGINE to FALSE
end
 ...


Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Sheri_Steeves
Posts: 124
Joined: Mon Oct 22, 2012 2:14 pm

Re: The following applications should be closed prompt

Postby Sheri_Steeves » Tue Mar 07, 2017 11:17 am

Francesco,

That is awesome; I was going to look for something like that but got pulled away on another project.

I'll definitely check this out when I get back to this. From my initial testing this should hopefully resolve this. I will let you know.

Thanks,

Sheri

Sheri_Steeves
Posts: 124
Joined: Mon Oct 22, 2012 2:14 pm

Re: The following applications should be closed prompt

Postby Sheri_Steeves » Thu Mar 09, 2017 12:56 pm

Francesco,

Worked like a charm, thanks so much!!

Sheri

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: The following applications should be closed prompt

Postby FrancescoT » Thu Mar 09, 2017 2:21 pm

:D :D :D
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Sheri_Steeves
Posts: 124
Joined: Mon Oct 22, 2012 2:14 pm

Re: The following applications should be closed prompt

Postby Sheri_Steeves » Fri Mar 10, 2017 12:56 pm

Francesco,

Well, I spoke too soon. The above fix worked for one of my installs that has services but now a similar error is occurring with another program, one where we install a DLL that is a shell context menu for Windows Explorer. After removing the shell context menu, we see a dialog box prompting us to close Windows Explorer - THIS IS VERY BAD as clicking Yes takes down the whole O/S shell.

FileInUseFCC-Windows 10.png
FileInUseFCC-Windows 10.png (30.23 KiB) Viewed 12339 times


In our uninstall code, before we call ApplyUninstall I am unregistering the shell context menu dll, and the call does succeed. I can see this when I show the window and run the regsvr32.exe in non-silent mode as in this mode I have to dismiss the dialog before proceeding.

I added the NATIVE_ENGINE settings around these calls but it didn't make a difference.

Code: Select all

    Comment: Unregister context menu shell extension
    Set Variable NATIVE_ENGINE to TRUE
    Run Program $WINSYSDIR$\regsvr32.exe /u "$INSTALLED_LOCATION$\PNFCCSCM6.dll" (WAIT)
    Run Program $WINSYSDIR$\regsvr32.exe /u "$INSTALLED_LOCATION$\PNFCCSCM664.dll" (WAIT)
    Set Variable NATIVE_ENGINE to FALSE
     
    Comment: Unregister bins and profiles
    Run Program $INSTALLED_LOCATION$\PNFCC6.exe /unregisterbins (WAIT)
    Run Program $INSTALLED_LOCATION$\PNFCC6.exe /unregister (WAIT)
     
    Comment: Remove printer
    Run Program $INSTALLED_LOCATION$\Setups\PNSetup.exe /REMOVE (WAIT)
     
    Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)
     
    Comment: Remove swid tag files so directory is deleted.
    Delete Files $INSTALLED_LOCATION$\*.swidtag (when uninstalling)


I am building on X6 (23.01), currently migrating to X6 (23.03) to see if that helps.

My QA team tells me they see this behaviour on he following WIndows platforms:

- Windows 8.1 (x32 & x64), Windows 2012 R2, Windows 10 (x32 & x64) and Windows 2016
- No prompt box on Windows XP – Windows 2012

Any ideas?

Thanks,

Sheri


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 54 guests