Remove Maintenance-Mode

Got a problem you cannot solve? Try here.
Post Reply
Feyh
Posts: 21
Joined: Thu Apr 05, 2012 2:48 am

Remove Maintenance-Mode

Post by Feyh »

EDIT:
I guess I found the thing I was looking for in the Help.
It's called "Transform Instance".

I let this topic opened. Maybe anyone can confirm my solution or gimme some tipps how to handle it in another way.



Hello,

Current case:
- I'm installing my Software via my MyInstallation.exe.
- Installation done
- Run the MyInstallation.exe again
- Now the maintenance opens.

But i want it to be like this:
- I'm installing my Software via my MyInstallation.exe.
- Installation done
- Run the MyInstallation.exe again
- The normal installation should be started.

But if i use the "Uninstall"-Shortcut which is found in the Startmenu it should start the uninstallation. As well as when I use it in the system control-> programms and features -> Uninstall.

How can i do this?
Is there an option or do i have to script it? If i have to do it via script, how can i differ whether he started the setup again or pressed the uninstall-button?

2.:
I installed my program. Now i change something in my setup, build a new setup file. If i run this new setup file it automatically starts to uninstall my previous installation. I don't want it to do that.
How can i disable that?

3.:
If i use the "change installation"-option it asks for the original installation ressources (as far as i don't start it with the original .exe).
But in this dialog the user have to point to the extracted temp files instead of the .exe. That's not nice. A customer, which just wants to use this program, doesn't know how to find these files.
Is there any other solution?

Thanks in advance!

Regards
Feyh
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Remove Maintenance-Mode

Post by FrancescoT »

Dear Feyh,

Transform Instance command allows new installations of an already installed product on the same system. Normally Windows Installer allows only a single instance of a product to be installed on a computer. Starting setup again with an existing instance allows to modify, repair, or uninstall that instance only. Beginning with Windows Installer 3.0, it is possible to install multiple copies of a product on the same system using instance transforms. However Windows Installer 3.0 or later is required (and this version of Windows Installer is unavailable on Windows 9X operating systems).

Said this, if you use the above technique, you can run multiple times your setup package (without rebuild it ... but exactly the same).
It will be installed as a different package, everytime you run it ( ... along with certain restrictions in package authoring which must be observed).

Are you sure you want it?

Using Windows Installer engine (without Transform Instance ... as it is by default), the previous version of a package must be removed if another one have to replace it. Honestly, I don't understand why you don't want to remove it.

You can eventually customize your setup flow process to execute the unistall process later (for example, after the Setup interview) but anyway, if you use Windows Installer engine, it must be done before the installation starts.

As alternative you can use NATIVE_ENGINE offered by InstallAware.
"InstallAware includes a native code setup engine beginning with InstallAware version 10. The native engine complements Microsoft's Windows Installer setup engine and provides faster execution speeds and greater flexibility at runtime."
Using NATIVE_ENGINE you can do as you prefer and what you want ... but in this case your package will be out by any Windows Installer Engine rules or features. Please refer to IA documentation for more detailed informations.
Is there an option or do i have to script it? If i have to do it via script, how can i differ whether he started the setup again or pressed the uninstall-button?
You can catch in your script if the setup has been executed in MAINTENANCE MODE.
Please refer to IA documentation for "REMOVE", "REPAIR" & "MAINTENANCE" predefined variables.
If i use the "change installation"-option it asks for the original installation ressources (as far as i don't start it with the original .exe).
But in this dialog the user have to point to the extracted temp files instead of the .exe. That's not nice. A customer, which just wants to use this program, doesn't know how to find these files.
This is really simple, use "Always Cache Setup Sources" with your project.

This control is available under Build Settings in Design View.
"This three-state check-box lets you control setup source caching. When the box is filled, the default source caching option (as described above for each build type) is in effect. When cleared, setup sources are never cached. When checked, setup sources are always cached."
Please refer to IA documentation for more detailed informations.

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
Feyh
Posts: 21
Joined: Thu Apr 05, 2012 2:48 am

Re: Remove Maintenance-Mode

Post by Feyh »

Dear Francesco,

like always, many thanks for your detailed answer!
FrancescoT wrote: Are you sure you want it?
Using Windows Installer engine (without Transform Instance ... as it is by default), the previous version of a package must be removed if another one have to replace it. Honestly, I don't understand why you don't want to remove it.
We got several customer, and everyone is using this software in another way. This software can be started multiple times. You can start 2 instances and configure them total differently, but only one will be saved. But you can also create a shortcut to the .exe and add some parameters. This way u can start the program by using the orignal exe with configuration 1 and you can start it by using the shortcut with configuration 2. That saves alot of time.

- Now we got customers, which got 1 installation of the program, and many shortcuts to start it with different configurations.
- Other customers just copy and paste the whole program directory to get different .exe with different configurations
- Other customers do the same, but they don't use copy&paste, instead they are installing one more instance with the setup.

That's the main reason why i need this setup to be like that.
The other reason is our licensing. While installing the customer have to select 1 out of 3 license options. For example he installs the program the first time and just wants to try it. In this case he selects "Demo version". While installing a demo.dll will be copied into the program directory. Now he tested it and decides to buy the software. Now he needs an other .dll (for example softwareAuthorization.dll). He needs to run the installation again, this time he selects "Software Authorization". The softwareAuthorization.dll will be installed instead of the Demo.dll.
I know, it would be way easier with an option in the software like "Activate your license". But i'm only creating the installations. Others are coding the program.
FrancescoT wrote: This is really simple, use "Always Cache Setup Sources" with your project.
This control is available under Build Settings in Design View.
I noticed, that i got this checkbox already checked the whole time. It still asks for the original setup-files :(

Regards
Feyh
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Remove Maintenance-Mode

Post by FrancescoT »

Dear Feyh,

if these are your needs, Transform Instance is the only possible solutions.
Please note that, as already said, have certain restrictions in package authoring which must be observed.

For example with patch, only with first installed instance it can be used.

I suggest you also to evaluate the possibilities offered by InstallAware NATIVE ENGINE.
Very probably in your situation is the best solution.
I noticed, that i got this checkbox already checked the whole time. It still asks for the original setup-files
Have you completed removed your previous setup package and then installed the one that uses "Always Cache Setup Sources"?

If still fails, I suppose exist something with your project ... I use it without any problem.
Are you able to repplicate it with a sample project?

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
Feyh
Posts: 21
Joined: Thu Apr 05, 2012 2:48 am

Re: Remove Maintenance-Mode

Post by Feyh »

Dear Francesco,
FrancescoT wrote: Have you completed removed your previous setup package and then installed the one that uses "Always Cache Setup Sources"?

If still fails, I suppose exist something with your project ... I use it without any problem.
Are you able to repplicate it with a sample project?
Yes, i completely removed my previous setup package.
But i found my error.
I where using this option with the default value, means a square instead of a normal check.
Could you please explain me what's the difference between the two selections? Have a look at the attachment.
Difference_Cached.PNG
Difference_Cached.PNG (1.63 KiB) Viewed 7266 times
- Not checked = Disables easy patching
- Checked = Enables easy patching
- Checked with the square = ?

Right now i'm feeling like this:
no-idea-what-im-doing-dog-driving.jpg
no-idea-what-im-doing-dog-driving.jpg (69.43 KiB) Viewed 7266 times
Thank you very much!

Regards
Feyh
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Remove Maintenance-Mode

Post by FrancescoT »

Dear Feyh,
- Checked with the square = ?
When the box is filled, the default source caching option (as described in IA documentation for each build type) is in effect.

If you don't want to have any problem ... just have it checked.

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
Post Reply