/build/static/layout/Breadcrumb_cap_w.png

Custom actions

can somebody help me on this asap

Custom Action to delete this folder by using In-script option Immediate Execution
Custom Action to delete this Folder by using In-script option Deffered Execution System Context.

Thanks for the help

0 Comments   [ + ] Show comments

Answers (11)

Posted by: WiseAppPackager 13 years ago
Purple Belt
0
What do you exactly need?
Do you want a CA code to delete any specific folder? Which scripting are you using?
Posted by: angel7 13 years ago
Senior Yellow Belt
0
hi
i dont want vbscript custom action.Just a custom action to delete folder
Posted by: cygan 13 years ago
Fifth Degree Brown Belt
0
there is no custom action just to remove a folder / file

you can use the removefile table to do the following

1) delete files during installation or uninstallation
2) remove folders only if they are empty
Posted by: angel7 13 years ago
Senior Yellow Belt
0
hi,
I want a script to delete folder but in the properties it shuld be In-Script option .Plz help me on this.I am very confused.
Posted by: captain_planet 13 years ago
Black Belt
0
....I'm taking it based on your MSI knowledge that you're no relation to AngelD. [;)]

Anyhow, Cygan's right. Either use the RemoveFile table, or write a VBScript Custom Action (type 38) with IN-SCRIPT EXECUTION set to Deferred in a System Context , and schedule it just before InstallFinalize.
Posted by: anonymous_9363 13 years ago
Red Belt
0
You don't NEED a CA to remove a folder. As directed, use the RemoveFile table.
Posted by: WiseAppPackager 13 years ago
Purple Belt
0
And, if you want a VBScript to do so, here it is.
It would delete the 'C:\Test' folder.

dim filesys, instfolder
set filesys = CreateObject ("Scripting.FileSystemObject")
set instfolder = filesys.GetFolder("C:\Test\")
instfolder.Delete

Use this code in the custom action 'Call VBScript From Embedded Code', and sequence it in the manner what captain_planet has written above.
Don't forget to tell, if it worked or not.
Posted by: angel7 13 years ago
Senior Yellow Belt
0
Guys thanks a lot,I got the solution
Posted by: angel7 13 years ago
Senior Yellow Belt
0
I used the method wot 'Captain Planet' and 'WiseAppPackager' has told me .It worked.Thanks a lot guys
Posted by: anonymous_9363 13 years ago
Red Belt
0
If you MUST go this route...dim filesys, instfolder
set filesys = CreateObject ("Scripting.FileSystemObject")
'// Does the object 'filesys' now exist? Er...we don't know
set instfolder = filesys.GetFolder("C:\Test\")
'// Does the object 'instfolder' now exist? Er...we don't know that, either
instfolder.Delete
'// Did the folder get deleted? Ummm...we hope so
Error-trap, error-trap, error-trap, for God's sake. Always assume your code will FAIL!
Posted by: AngelD 13 years ago
Red Belt
0
ORIGINAL: captain_planet

....I'm taking it based on your MSI knowledge that you're no relation to AngelD. [;)]


Thanks for that Captain [8D]
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ