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

How to give user message while uninstallation


9 replies to this topic

raghu

raghu
  • Full Members
  • 33 posts

Posted 23 October 2008 - 13:08


Hi All,

I am using Basic msi project. This is going to install properly but while uninstallation I need to display some user message (some msg box).

please help me anybody on this.


Thanks
Raghu.

vijayakumar

vijayakumar
  • Full Members
  • 43 posts

Posted 24 October 2008 - 04:40

Hi Raghu,

What kind of message do you want to display?

That is, Do you want just to display some info to the user and continue with your uninstallation or to carry out some action based on the return value.

-Vijay



Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 27 October 2008 - 10:50

MsiProcessMessage offers this functionality, but be aware that the message will not show in silent installations. But that's probably what you want anyway.

You shouldn't use the normal MessageBox / MsgBox functions, they have a very real risk that the message is displayed *behind* the installer window. When that happens, the user will think that you install is hanging.

raghu

raghu
  • Full Members
  • 33 posts

Posted 28 October 2008 - 08:15

Thanks Vijay/Zweitze for your reply.

Actually in my application I am checking one registry entry (through systemsearch). If that registry entry exists the un-installation should not happen, means to give some message to user and then exit otherwise should continue un-installation.

Thanks & Regards
Raghu.


Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 28 October 2008 - 10:59

That's easier.

System Search sets a property. Create a Custom Action type 19 (I believe it's called Error Custom Action in newer versions?) and enter the text to be displayed.
Put this action in both (UI and Execute) sequences, after the AppSearch action. The condition is just the property that will be set by System Search.

This is handled even better, your message will be written in the event log too, and in case of remote installations your message is passed to the right place (the 'other' computer).

raghu

raghu
  • Full Members
  • 33 posts

Posted 28 October 2008 - 13:59


Thanks Zweitze

I am using installshield10.5 version. not able create custom action of type 19.
please let me know how to create in 10.5 version.

Thanks in advance.

vijayakumar

vijayakumar
  • Full Members
  • 43 posts

Posted 30 October 2008 - 10:04

Hi Raghu,

Not sure about version 10.5, but hope this would work.

To exit the uninstallation from Custom Action, write a VBScript CA and set the return value to 2. Refer this thread for exiting uninstallation from CA http://forum.install...showtopic=18538

-Vijay

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 30 October 2008 - 11:14

I believe IS 10.5 has a Custom Action wizard, if you run it, it asks for a type. Look for "Error Custom Action". Note: this type was not always supported by InstallShield, I know that IS 11 does support it, and IS 10 does not.

If you can't find it there: Go to the Direct Editor (look up in help). Find the CustomAction table. Create a new row, and fill the columns like this:
Action: Name of the Custom Action
Source: keep this empty
Target: Enter the message you want to show
Type: 19 (hence the Custom Action type 19)

See http://msdn.microsof...y/aa368078.aspx

After you created that, don't forget to add the new CA to the sequences.


raghu

raghu
  • Full Members
  • 33 posts

Posted 04 November 2008 - 14:03


Hello Zweitze,

I have did same thing.

Action: Name of the Custom Action
Source: empty
Target: I have given message
Type: 19

But the message is displaying while installation also. if we give ok its existing not installing the application. What is the solution for this.

Thanks in advance.
Raghu.

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 07 November 2008 - 11:34

When you add the CA to the sequences, set the conditions for executing that CA appropriatly.