Custom Action
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.
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
Answers (13)
Please log in to answer
Posted by:
cygan
17 years ago
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
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
Posted by:
Flakes
17 years ago
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.
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.
Posted by:
cygan
17 years ago
Posted by:
Flakes
17 years ago
Posted by:
nheim
17 years ago
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
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
Posted by:
Flakes
17 years ago
Posted by:
Flakes
17 years ago
Posted by:
nheim
17 years ago
Posted by:
Flakes
17 years ago
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.
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.
Posted by:
nheim
17 years ago
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
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
Posted by:
Flakes
17 years ago
Posted by:
Flakes
17 years ago
Posted by:
nheim
17 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.