cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
james_decosta
Level 9

hi i want to create a customised uninstaller

hi,
i want to find uninstaller component and execute if it exists.
I got the link from this url:

http://knowledge.macrovision.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=Q112838&sliceId=1&docTypeID=DT_HOWTO_1_1&dialogID=8020901&stateId=0%200%201087525

And i followed the step as is:
First i got the uninstaller component UUID and version in the Organisation----components.
And then in the pre-install task,i added an action as find component registry action:
and gave the uninstaller components unique UUID and then in the install task,i used the create an uninstaller action,but i am unable to proceed after that.
Any sort of help is greatly appreciated.
Basically what i want to achieve is to uninstall the installer first if it is already installed.
James
Labels (1)
0 Kudos
(11) Replies
Yves_Kreis
Level 7

That should be it isn't it?

Best Regards,
Yves
0 Kudos
james_decosta
Level 9

hi yves,
i created the uninstaller action and created the uninstaller,i added a rule on it as "check file\folder attributes on it.
That is install "create uninstaller action" if the file does not already exist"
And then i added another rule on it like install only if
"$REG_COMPONENT_COUNT$" does not equal 0.
But its not working.
Any help is awaited.
When i installed it first time,it got installed and when i installed it the second time it got installed,so its quite clear its not working.
0 Kudos
Yves_Kreis
Level 7

I am not sure if rules work on the Create Uninstaller action.

Try the following workaround: use $USER_MAGIC_FOLDER_x$ as installation folder for the uninstaller. Set it to $USER_INSTALL_DIR$ if $REG_COMPONENT_COUNT$ does not equal 0 and to $INSTALLER_TEMP_DIR$ if not.

Best Regards,
Yves
0 Kudos
james_decosta
Level 9

hi yves,
i followed these steps for checking for the installer and executing if it exists.
1.Find components in registry and i gave the Unique id of the uninstaller component.
But i did not find anything in the $REG_COMPONENT_LOCATION$
and i got $REG_COMPONENT_COUNT$ equal to 0.
I do not understand why is it so???????????????????????????????
And after that i do not understaND how to call the uninstall MyProduct.exe in the $REG_COMPONENT_LOCATIONS$.
And one more question if there are mutiple instances of my product installed on a machine what will happen.
Will it uninstall all the instances installed or only one???????
0 Kudos
james_decosta
Level 9

HI,
these are the steps i followed but i am get the following values in the installation log:
$REG_COMPONENT_COUNT$=0
$REG_COMPONENT_LOCATIONS=(BLANK)
REG_COMPONENT_VERSION=(BLANK)
WHERE AM I GOING WRONG???????????????
I HAVE USED THE UNINSTALLER COMPONENTS UNIQUE ID IN THE FIND COMPONENT IN REGISTRY ACTION?????????????????????????????
----------------------------------------------------------------------
AND AFTER THIS HOW SHALL I EXECUTE THE UNINSTALLER.EXE .
0 Kudos
james_decosta
Level 9

hi,
still i am unable to execute the uninstaller for uninstalling my product if it exists on the end user machine before i start installation of my product.
I am unable to proceed after FIND COMPONENT IN REGISTRY ACTION.
as i got $REG_COMPONENT_LOCATIONS AS NULL.
And can i write some custom code for executing the uninstaller.exe if $REG_COMPONENT_LOCATIONS contain some value.
Any sort of suggestion is eagerly awaited .
0 Kudos
purcellk24
Level 7

Here is a suggestion...
Output your IA variables to the console right before you want to execute your uninstaller.
Verify that all of your variables are what you expect them to be.

Just looking at your posts, you don't have $$ around
$REG_COMPONENT_LOCATIONS


Also, like I have posted before, try writing a simple installer that only does minimal steps. You may find "simple" mistakes quicker. It is also better to post a project that can replicate your problem, then to have someone guess what your problem may be.
0 Kudos
james_decosta
Level 9

hi purcel,
i will follow your suggestion and give you a sample project for your review.
But i am unable to get $REG_COMPONENT_LOCATIONS$
$REG_COMPONENT_COUNT$ (i got the value as 0)
And $REG_COMPONENT_VERSION$
I will post a sample project.

Ok suppose i get some value in the $REG_COMPONENT_LOCATIONS$
then what shall i do next to execute the uninstaller .exe
james.
0 Kudos
james_decosta
Level 9

hi,
well i am unable to achieve this feature even now as i am unable to get anything in the $REG_COMPONENT_LOCATION$.
Any suggestions are awaited.
james.
0 Kudos
narendhran1
Level 5

HI James,
Just check will it be useful for u,
Basically what i want to achieve is to uninstall the installer first if it is already installed.
if this was ur problem i have some solution but not using find component registry action...
what i do is in the preinstall stage i set two Get Windows registry action and get details of already installed product...
In the first Get Windows registry action i get ProductId and in the next one i get the InstallLocation of my old installer...
and ten write a custom code action where in the install method i check for my previous installation of my product ,if the product is already ter i just run the uninstaller..
just check the code attached...

We can do the same using execute uninstaller action tooo.. but problem is since we r checking in preinstall mode both installtion wizard and uninstalltion wizard is visible(also this can be silent mode too)
0 Kudos
anitha
Level 5

HI,
Even i have a little similar problem to this in install anywhere
i would like to set the product registry path to hklm\\/
but it goes into microsoft\windows\arpcache.. by default.
Can i set the default path by setting any IA variables or is there any other way to do this. Can you please help me..
0 Kudos