Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Avoid Maintenence


10 replies to this topic

technojewel

technojewel
  • Members
  • 17 posts

Posted 03 February 2006 - 11:09

I m using Installshield 11.5 Professional Edition. I have made a Basic MSI project.

What I want is when I try to install the application, when its already installed on the PC then it should not give me the maintenence mode i.e. Modify, Repair, Remove. It should do either one of the following:
1.) Pop a message that the <applicationname> is already installed & exit on clicking OK (or whatever button is there)

OR

2.) Give me only "Remove" option.

OR

3.) Reinstall the application without any messages.

I tried deleting the "MaintenenceType" dialog box and then try it but then it gave me error when I tried to reinstall saying some internal error "Dialog Missing".

I also tried deleting modify & repair radio boxes but then again it didn't work.

Any help will be appreciated. Kindly help .. this is urgent sad.gif .

Edited by technojewel, 03 February 2006 - 11:10.


lavocat

lavocat
  • Full Members
  • 158 posts

Posted 03 February 2006 - 12:12

Open the Install UI sequence. There is an entry MaintenanceWelcome (with subdialogs MaintenanceType ...)

To prevent these dialogs to be displayed, edit the conditions of MaintenanceWelcom in the sequence.

default conditions should be:
Installed And Not RESUME And Not Preselected And Not PATCH

add a non defined property. Example:
THANKYOULAVOCAT And Installed And Not RESUME And Not Preselected And Not PATCH

So the maintenances dialogs will never appear while THANKYOULAVOCAT is not defined.


If you want the diplay your dialog which says the setup is already installed, just insert it above MaintenanceWelcome with the same conditions (except THANKYOULAVOCAT )
On this custom dialog you may add a button with the control event "EndDialog" + argument "Exit" (see the Dialog Behavior)

Edited by lavocat, 03 February 2006 - 12:48.


technojewel

technojewel
  • Members
  • 17 posts

Posted 03 February 2006 - 13:43

Thanks a lot for your reply. It really helped me.

But, there is a problem. I have created the dialog and added the button. Then under behavior I got PushButton1(Control Name) of Type PushButton. As you suggested I setted:
Event = EndDialog
Argument=Exit
for this pushbutton.

During reinstall, this dialog box appears perfectly but when I click the button the dialog box doesn't go away. I have also checked the sequence and this dialog box is placed exactly above "Maintenence Welcome".

Please suggest .

Thanks a lot again for your help. biggrin.gif

lavocat

lavocat
  • Full Members
  • 158 posts

Posted 03 February 2006 - 14:08

Did you add a blank dialog or a "Wizard dialog"?



technojewel

technojewel
  • Members
  • 17 posts

Posted 03 February 2006 - 14:14

I used blank dialog box.

lavocat

lavocat
  • Full Members
  • 158 posts

Posted 03 February 2006 - 14:24

Try to set 1 as Condition for this Event.

technojewel

technojewel
  • Members
  • 17 posts

Posted 06 February 2006 - 07:46

Sorry cudn;t reply earlier due to weekend.

Setting 1 as Condition solved my problem smile.gif. Thanks a lot for your help.

More queries:
I want to check if the user has installed MediaPlayer9 or above on the system before starting installation. So, I think I need to put 'OR' between different conditions (to check media player 9 & 10, respectively). Or, I can check if the version of mediaplayer is greater than or equal to 9. I know how to search the registries for entries but the Property dialog that comes at the end is stranger to me (while making system search). I m using Installshield 11.5 Pro and making a basic MSI project

Please suggest me how to put these checks?

And thanks again for your valueable help without which my (already delayed) project wud have been delayed further. Thanks.

lavocat

lavocat
  • Full Members
  • 158 posts

Posted 06 February 2006 - 08:46

If you want the installer stop starting and display an error message ("Media player can't be found, ...") you must select "Store the value in property and use the property in an install condition". The other choice "Just store the value in the property" allow you to use the property where you want: in a component condition, in a feature condition, in a (Custom) Action condition like you did for the MaintenanceWelcome dialog.

Look at the UI sequence and you'll find AppSearch action which sets the property when searching the value. It is at the best place because it is before all actions so the property value will be available to ALL actions.

When you create a new property, always use Public property!
Public property names cannot contain lowercase letters.

sebica79

sebica79
  • Members
  • 62 posts

Posted 06 February 2006 - 10:04

Another solution would be to create a Spawn Dialog, with the remove option on it. Place a CA in install script which find in the registry after you product code which is already installed. Set a property if is found, and conditioned the dialog to appear with that condition. The dialog must be set before Maintenance Dialogs.

technojewel

technojewel
  • Members
  • 17 posts

Posted 06 February 2006 - 10:31

QUOTE (lavocat @ 2006-02-06 08:46)
If you want the installer stop starting and display an error message ("Media player can't be found, ...") you must select "Store the value in property and use the property in an install condition". The other choice "Just store the value in the property" allow you to use the property where you want: in a component condition, in a feature condition, in a (Custom) Action condition like you did for the MaintenanceWelcome dialog.

Look at the UI sequence and you'll find AppSearch action which sets the property when searching the value. It is at the best place because it is before all actions so the property value will be available to ALL actions.

When you create a new property, always use Public property!
Public property names cannot contain lowercase letters.

But, there is a problem. Here is the scenario:

I want to check if the user has got Media Player v 9.0 or above.

So, I make a condition (system search) Find registry Entry-> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MediaPlayer\9.0 -> Store it in a property and set it as install condition, to check if the user has got Media Player 9 or not. Is there anyway where I can search for version greater than 9?

Else, I will have to make anyother system search for media player version 10. Then put it as install condition.

Now, we have two conditions. each for Media Player 9 & 10. So, if a user has Media Player 9 then the condition for Media Player 10 will not hold true and installation will stop. And, vice-versa if the user has vesion 10 then condition for version 9 will not hold true.

So, either:
-> I should do some ORing between the Media Player 9 and Media Player 10 conditions (which might be something like "(MEDIAPLAYER9FOUND) OR (MEDIAPLAYER10FOUND)", where MEDIAPLAYER9FOUND & MEDIAPLAYER10FOUND are the properties containing the result of my system searches). Please let me know if the syntax is right?
OR
-> I need to make a single system search/condition that can check Media Player 9 and above.

Sorry, if the question is too simple but I am a complete novice with Installshield.

Thanks in advance.


technojewel

technojewel
  • Members
  • 17 posts

Posted 06 February 2006 - 10:34

QUOTE (sebica79 @ 2006-02-06 10:04)
Another solution would be to create a Spawn Dialog, with the remove option on it. Place a CA in install script which find in the registry after you product code which is already installed. Set a property if is found, and conditioned the dialog to appear with that condition. The dialog must be set before Maintenance Dialogs.

I m making a Basic MSI Project. I have no installscripts right now. I don't know how to write scripts in installshield, since, I am very confused about syntax and other stuffs.
So, this will not be feasible for me as of now but would surely like to know how to do this since I need to write scripts for my project. I need scripts to do following action:

If ABC product is installed then copy following files
File1
File2
File3
File4

Any suggestions please. Also, is there any resource on the net where I can learn basic scripting? I m using Installshield 11.5 Pro.

Thanks.