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
- :
- Re: Run a Custom Action
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
‎Sep 14, 2009
01:36 AM
Run a Custom Action
Hi everybody!!!! 🙂
I'm new to this community as well as to InstallShield. Can anybody help me with defining custom actions :
1. I need to run a VB Script as a custom action by calling it and not embedding it. this Vb Script creates a new folder. What should be the respond options and where should i place it in the sequence?
2. I also need to run a vbscript to delete the folder when i uninstall this folder. I've no idea to go about this how to go about it:( .
3. Also can anybody tell me the difference between embedding the VbScript in InstallScript and Calling the script. Which one is prefferred ann pros ad cons of both.
Thanks in advance...
I'm new to this community as well as to InstallShield. Can anybody help me with defining custom actions :
1. I need to run a VB Script as a custom action by calling it and not embedding it. this Vb Script creates a new folder. What should be the respond options and where should i place it in the sequence?
2. I also need to run a vbscript to delete the folder when i uninstall this folder. I've no idea to go about this how to go about it:( .
3. Also can anybody tell me the difference between embedding the VbScript in InstallScript and Calling the script. Which one is prefferred ann pros ad cons of both.
Thanks in advance...
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 14, 2009
09:05 AM
First, what kind of project are you using? In a Basic MSI project, you can create a folder using the CreateFolder table and can remove it using the RemoveFile table instead of using VBScript custom actions.
In InstallScript MSI, you can either use the MSI tables or you can create and remove a folder using InstallScript, again without using VBScript custom actions. In my opinion, using the inbuilt MSI tables is a better solution.
In InstallScript MSI, you can either use the MSI tables or you can create and remove a folder using InstallScript, again without using VBScript custom actions. In my opinion, using the inbuilt MSI tables is a better solution.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 15, 2009
12:32 AM
actually its just a demo. I've a vbscript around which I've to build a Setup.exe and uninstall.exe. So i've just taken a random script to try out things. Can you suggest what should I do in my case????
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 15, 2009
03:49 AM
If you 'embed' the script your package becomes self contained, you can pass it around without people having to take a script as well, plust you can easily import your package into major deployment tools. But if you need to reference a script from a path you can call an EXE custom action from a path referencing a directory, set the path up to point to cscript.exe and run the script as an argument to cscript.exe. Embedding is the best way to go though.
As for the delete folder business you need to look into the removefile table.
http://msdn.microsoft.com/en-us/library/aa371201(VS.85).aspx
Specifying no files will remove the folder instead. But be warned you need another entry to remove the files too
As for the delete folder business you need to look into the removefile table.
http://msdn.microsoft.com/en-us/library/aa371201(VS.85).aspx
Specifying no files will remove the folder instead. But be warned you need another entry to remove the files too
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)