This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Checking if Control Panel is used
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 07, 2008
02:59 AM
OnUninstall (Install Script) Event not called
Hi All,
I am using InstallShield 2008 .OnUninstall event in the script is not get called when the product is uninstalled.
Can anyone help me how to fix this problem and all let me know whats the reason behind this.
My advance Thanks !
Thank You.
I am using InstallShield 2008 .OnUninstall event in the script is not get called when the product is uninstalled.
Can anyone help me how to fix this problem and all let me know whats the reason behind this.
My advance Thanks !
Thank You.
(10) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 07, 2008
05:11 AM
What type of project do you use?
1) pure InstallScript
or
2) InstallScript MSI
1) pure InstallScript
or
2) InstallScript MSI
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 10, 2008
04:28 AM
Hi Nick Rivers,
I appreciate you'r replie ,thanks a lot.
I am using pure InstallScript project. I went through InstallShield Help Library,which says
--------------------------------------------------------------------------
OnUninstall
InstallShield 2008 » InstallScript Language Reference
For InstallScript installations, the OnUninstall event is called when the installation is run with the -uninst parameter. This is the only event that is called when the -uninst parameter is used. The default code for the OnUninstall event uninstalls a previously installed product
--------------------------------------------------------------------------
I allso tried using that but still ,i am not able to fix the problem.The Acutal problem is when i try to uninstall the product through Start Menu ,the OnUninstall event should be called but thats not happening.
My code:
szCommand = UNINSTALL_STRING + "-uninst";
AddFolderIcon( szPgmFolder_Path ^ svFolder , "Uninstall " + @PRODUCT_NAME + " for ResumeGrabber Pro" , szCommand , TARGETDIR , TARGETDIR^"Uninst.ico", 0, "", REPLACE );
Wating for you'r replie Nike.
My advance Thanks .
I appreciate you'r replie ,thanks a lot.
I am using pure InstallScript project. I went through InstallShield Help Library,which says
--------------------------------------------------------------------------
OnUninstall
InstallShield 2008 » InstallScript Language Reference
For InstallScript installations, the OnUninstall event is called when the installation is run with the -uninst parameter. This is the only event that is called when the -uninst parameter is used. The default code for the OnUninstall event uninstalls a previously installed product
--------------------------------------------------------------------------
I allso tried using that but still ,i am not able to fix the problem.The Acutal problem is when i try to uninstall the product through Start Menu ,the OnUninstall event should be called but thats not happening.
My code:
szCommand = UNINSTALL_STRING + "-uninst";
AddFolderIcon( szPgmFolder_Path ^ svFolder , "Uninstall " + @PRODUCT_NAME + " for ResumeGrabber Pro" , szCommand , TARGETDIR , TARGETDIR^"Uninst.ico", 0, "", REPLACE );
Wating for you'r replie Nike.
My advance Thanks .
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 10, 2008
09:56 AM
Is there a space at the end of UNINSTALL_STRING? I'm really not sure for InstallScript, but you might try something like UNINSTALL_STRING + " -uninst" instead as a thought.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 10, 2008
12:31 PM
bryanwolf is correct. There is no space in UNINSTALL_STRING as of IS 7.0.
Cheers,
ME
Cheers,
ME
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 12, 2008
12:25 AM
Hi bryanwolf & MarkEarle,
Thanks a lot guys.It's working good.Can You allso help me for a other problem which i am facing.
The problem is when i try to uninstall the product from the control panel its calling OnMaintUIBefore but it should call OnUnistall.
It would be nice if you could help me in this.
My advance Thanks !
Thanks a lot guys.It's working good.Can You allso help me for a other problem which i am facing.
The problem is when i try to uninstall the product from the control panel its calling OnMaintUIBefore but it should call OnUnistall.
It would be nice if you could help me in this.
My advance Thanks !
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 12, 2008
04:55 AM
Hello Sammathew
In InstallShield 2008 the function OnUninstall does not work, you must use OnMaintUIBefore and OnMaintUIAfter.
In InstallShield 2008 the function OnUninstall does not work, you must use OnMaintUIBefore and OnMaintUIAfter.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 12, 2008
05:46 AM
sammathew wrote:
Hi bryanwolf & MarkEarle,
Thanks a lot guys.It's working good.Can You allso help me for a other problem which i am facing.
The problem is when i try to uninstall the product from the control panel its calling OnMaintUIBefore but it should call OnUnistall.
It would be nice if you could help me in this.
My advance Thanks !
That´s correct. OnMaintUIBefore will be called by default. If you want to prompt for uninstall directly you could do this for example:
Add a custom command line paramater to UNINSTALL_STRING at the end of 'OnFirstUIBefore' and evaluate the commandline parameter at the beginning of 'OnMaintUIBefore' like this:
if (CMDLINE % "-uninstall") then
'put your code for uninstall here'
else
'default OnMaintUIBefore code'
endif;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 14, 2008
02:20 AM
Hi Nick Rivers,
I tried the code that you have mentioned .
--------------------------------------------------------------------------
if (CMDLINE % "-uninstall") then
'put your code for uninstall here'
else
'default OnMaintUIBefore code'
endif;
--------------------------------------------------------------------------
But when i debbuged the script it does'nt check the if condition.Is there any thing that i need to include in the script.If so, its my request kindly help me please.
Is there any way to find that the user is trying to uninstall the product through the control panel.If so , please let me know.
My advance Thanks!
I tried the code that you have mentioned .
--------------------------------------------------------------------------
if (CMDLINE % "-uninstall") then
'put your code for uninstall here'
else
'default OnMaintUIBefore code'
endif;
--------------------------------------------------------------------------
But when i debbuged the script it does'nt check the if condition.Is there any thing that i need to include in the script.If so, its my request kindly help me please.
Is there any way to find that the user is trying to uninstall the product through the control panel.If so , please let me know.
My advance Thanks!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 01, 2008
12:21 PM
I've always used
if(ADDREMOVE) then
as the first line of OnMaintBefore
This was my way of preventing an uninstall experience if someone relaunched the setup. In other words users could only uninstall if they went to the Add/Remove of the control panel.
Good luck.
if(ADDREMOVE) then
as the first line of OnMaintBefore
This was my way of preventing an uninstall experience if someone relaunched the setup. In other words users could only uninstall if they went to the Add/Remove of the control panel.
Good luck.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 02, 2008
02:46 PM
I am using IS12. If you go General Information -> Product Properties and set "Enable Maintenance" = No then it calls OnUninstallEvent. If Value is set to YES then it calls OnMaintUIBefore event.