Hi All,

I have to run a fairly large vbscript code block on uninstall.I have tried using the Custom Action ->run vbscript from installed file option in wise.I have chosen the condition as REMOVE~="All" ,and I am putting the action after InstallFinalize.Is this right ? but the its not working as I want it to ?

Please, can any of you guide me on this ? Am i putting the action where it is supposed to be?


What the code does is run some commands using Shell.run and a regdelete.

Thanks.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
hi flakes

if you are running a vb script on uninstall

then use CALL VB SCRIPT FROM INSTALLATION

LOCATION Normal Execute Immediate/deferred.

CONDITION REMOVE="ALL"

SCRIPT FILE : browse to vbs file

script fucntion call : leave blank

test your script first to make sure it works and I think the CA will work fine

if you are still having problems let us know and then can show you how to do it in orca
Answered 12/11/2006 by: cygan
Fifth Degree Brown Belt

Please log in to comment
0
Thanks Cygan,

I tried putting the action just before the InstallFinalize, but I dont see the action being run.I am writing to a log file to see if the commands are being run.But dont see the log file if i put the action before install finalize or after installfinalize.

Let me expand on what I am trying to do:

1.During install check to see if a registry key is there, if not, run four commands invoving two exe's within the installation .And also a regwrite .I have put this after InstallFinanize and its working fine, I can see the log being written,the registry entry is also there.I have given the condition as 'NOT Installed'.

2.During Uninstall check to see if a registry key is there, if yes, run four commands invoving two exe's within the installation,and also a regdelete .I have put this just before InstallFinanize and , I can see the log being written.But the app is still there in the add/remove programs section and no files are being removed.I have given the condition as 'REMOVE~="All"'.

I am obviously confused. :-) . Could you tell me where I am going wrong, and how can I do this using ORCA ?

Thanks for your time.
Answered 12/11/2006 by: Flakes
Senior Yellow Belt

Please log in to comment
0
hi flakes

have you tested your scripts manually to make sure that they are working fine before you add them to the CA

the condition that you want for the install is REMOVE<> "ALL"
uninstall REMOVE="ALL"

my mistake sequence the uninstall after InstallValidate action just before installfinalize
Answered 12/12/2006 by: cygan
Fifth Degree Brown Belt

Please log in to comment
0
Hi Cygan,


I have tested the scripts manually ,and they do work.

Now I am trying to break this up and try the embedded script way.

Thanks .
Answered 12/12/2006 by: Flakes
Senior Yellow Belt

Please log in to comment
0
Hi Flakes,
have you altered your scripts to comply with the Installer Rules? See:
http://msdn2.microsoft.com/en-gb/library/aa371538.aspx
http://msdn2.microsoft.com/en-gb/library/aa372865.aspx
Especially, you have to make sure, that you don't have "WScript.CreateObject" call in them (Instead simply use "CreateObject").
Hope this helps.
Regards, Nick
Answered 12/12/2006 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
Thanks nheim, I did have some "Wscript....." in there. Changed it now.

Thanks cygan , you were right, i did have something wrong in my original script. Now its okay.
Answered 12/13/2006 by: Flakes
Senior Yellow Belt

Please log in to comment
0
One more question along the same lines :

Is there some way I can achieve all this using standard actions ? I have never used standard actions before. Any pointers to some examples/tutorials please ?
Answered 12/13/2006 by: Flakes
Senior Yellow Belt

Please log in to comment
0
Hi Flakes,
what is your script doing exactly? We need to know that, before we could make any suggestions.
You where writing about deleting reg keys. This can be achieved with entries to the 'RemoveRegistry' table.
Hope this helps.
Regards, Nick
Answered 12/13/2006 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
Nick,

This is what my MSi is supposed to do:

1.During install, check to see if a registry key is there, if not, run four commands invoving two exe's within the installation .And also a regwrite

2.During Uninstall, check to see if a registry key is there, if yes, run four commands invoving two exe's within the installation,and also a regdelete

can standard action do this ?

Thanks.
Answered 12/13/2006 by: Flakes
Senior Yellow Belt

Please log in to comment
0
Hi Flakes,
yes this should be possible with built in MSI technics.
To find the registry key, use a RegLocator/AppSearch entry. This populates a public property with the reg key.
For the jobs to be done:
1. Put the regwrites in 1 component and set a condition in the components table with the property from AppSearch.
2. To call the exe's, you still need a CA, set a condition in the InstallExecuteSequence table with the Appsearch property and 'NOT Installed'

Hope this point you in the right direction.
Regards, Nick
Answered 12/13/2006 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
Hi Nick,

Thanks for the quick reply.

Let me give it a try.

Thanks again for your time.
Answered 12/13/2006 by: Flakes
Senior Yellow Belt

Please log in to comment
0
Hi Nick,

It's working fine.

Thanks a heap, you taught me something new.

[:)]
Answered 12/13/2006 by: Flakes
Senior Yellow Belt

Please log in to comment
0
Hi Flakes,
good to read, it worked for you.
Keep MSIing :-)
Regards, Nick
Answered 12/13/2006 by: nheim
Tenth Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity