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

using "abort" generate "Fatal Error" during uninst


6 replies to this topic

looser_007

looser_007
  • Full Members
  • 3 posts

Posted 05 March 2009 - 10:43

I have developed an application... when uninstalling from the Add or Remove applet i am checking whether the application is running or not.... if running im using "abort" to exit the uninstallation process( this is the custom action while uninstall) ....

it works fine and abort the uninstall process but pops up a prompt message saying "Fatal error during Uninstallation" ohmy.gif ...

How to avoid this prompt message. ... Please Help...sad.gif

Thanks .... ph34r.gif

Edited by looser_007, 05 March 2009 - 10:45.


rameshkannamalla

rameshkannamalla
  • Full Members
  • 5 posts

Posted 21 February 2012 - 12:35

Hi looser_007,

I am also facing the same Issue.
Can I know how did you resolev the Issue.

I spent almost 2 days to get the Solution.
Can you help me please.

Thanks in advance.

Ramesh.

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 22 February 2012 - 14:56

True "custom actions" are a Windows Installer concept, so I'm not sure looser_007 posted this to the right forum, but in what event/function are you trying to accomplish the same thing rameshkannamalla?
user posted image

rameshkannamalla

rameshkannamalla
  • Full Members
  • 5 posts

Posted 23 February 2012 - 14:55

Hi ,

I have created a Installer using InstallShield.
After installing the software in PC, I am trying to perform uninstall operation from the Add/Remove programs.

During Uninstallation Iam checking whether the software is running or not. For that I wrote a Installscript which checks for running status, prompt a message if running and abort the uninstallation.

The script is working fine. But after the Install scipt message is prompting then a fatal error is also prompting. Now I want to surpress the fatal error 1608.

So I want to know how to do it.

Thanks in advance.

Ramesh

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 24 February 2012 - 15:25

Thank you for the additional information rameshkannamalla, but you didn't answer my specific question of in which event/function are you trying to do these running process checks.

In any case, my suggestion would be to make sure you do this from the OnBegin() function and conditionalize it based on the presence of the "-uninst" switch in the command line arguments. However, I would recommend checking for such running applications also during install--especially to cover reinstalls.

However, you may also have to override the default Add/Remove Program's supporting UninstallString to use your a custom command line argument such as "-arp" along with the required default ones of "-runfromtemp -l0x0009". Then in your InstallScript, you would check for that custom argument, do you running process checks, and only if that's successful proceed with uninstalling by running the following code:
CODE
FeatureRemoveAll();
nResult = FeatureTransferData(MEDIA);
if (nResult < 0) then
 Msg("Uninstall failed.", SEVERE);
 abort;
endif;

I probably didn't give enough detail with some aspects, but hopefully that helps and let me know if you have any additional questions/problems.
user posted image

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 February 2012 - 15:41

@ rameshkannamalla: to avoid any confusion - which project type are you using?

rameshkannamalla

rameshkannamalla
  • Full Members
  • 5 posts

Posted 27 February 2012 - 11:34

Hi All,

Iam using Basic MSI Project. I have created a Installer. I also used a function to check the app running status.

The Same function is used to check the app running status during Installation and uninstalltion.

For unistallation, we have created a Custom Action and assigned the function and we have set the following options under Custom Action for installscript function to check the App
running status:
1. Return processing = Synchronous(Check exit code).
2. In Script Execution = Immediate Execution
3. ExecuteScheduling = Always Execute
4. Install UI Sequence = Absent from sequence
5. Install Exec Sequence = After UnpublishComponents.

The same function is working fine when installating the setup process. It is prompting the user defined message, aborting the installation and moving to the Wizard completion window.

But when trying to perfrom the uninstallation from Add/Remove programs, it is checking status, prompting message and prompting the Fatal Error also.

So I want to supress the fatal error.
So now how to do it.

Thanks in advance.

Ramesh.