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: Custom Action doesn't work
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
‎Dec 06, 2012
05:16 AM
Custom Action doesn't work
Hello,
I'm trying to create a setup for a Visual Studio Project.
In this setup I must:
1) create a folder if it isn't exist
2) execute sql script that create a database saved in the folder created at point1.
My problem is at point1. I use Custom Action and I create "New Managed Code" (Stored In Binary Table) to call a c# dll (CreateFolder.dll).
This dll utilize the following method:
public void CheckFolder()
{
string path = "C:\\Db";
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
}
I set my Custom Action as follows:
- Assembly file:\CreateFolder.dll
- Method Signature: CreateFolder.Class1.CheckFolder()
- Install UI Sequence and Install Exec Sequence:
I build the setup but when I run it an error occurred. This is error 2731: Selection Manager not inizialized.
What's going on? What's wrong?
I'm trying to create a setup for a Visual Studio Project.
In this setup I must:
1) create a folder if it isn't exist
2) execute sql script that create a database saved in the folder created at point1.
My problem is at point1. I use Custom Action and I create "New Managed Code" (Stored In Binary Table) to call a c# dll (CreateFolder.dll).
This dll utilize the following method:
public void CheckFolder()
{
string path = "C:\\Db";
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
}
I set my Custom Action as follows:
- Assembly file:
- Method Signature: CreateFolder.Class1.CheckFolder()
- Install UI Sequence and Install Exec Sequence:
I build the setup but when I run it an error occurred. This is error 2731: Selection Manager not inizialized.
What's going on? What's wrong?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 06, 2012
05:44 PM
Hi,
If you only need to create a folder, I'd use a standard action for that instead of a custom action. There is the CreateFolder table that you can use.
If you need to do other stuff as well in your custom action and don't want to use the CreateFolder table, sequence the CA after the file costing actions. E.g CostFinalize. That should get rid of the error message.
Sandra
If you only need to create a folder, I'd use a standard action for that instead of a custom action. There is the CreateFolder table that you can use.
If you need to do other stuff as well in your custom action and don't want to use the CreateFolder table, sequence the CA after the file costing actions. E.g CostFinalize. That should get rid of the error message.
Sandra
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 12, 2012
07:07 AM
Thank you very much Sandra!
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)