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
- :
- Calling .Net installer class and passing parameter into them via 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 21, 2011
10:06 AM
Calling .Net installer class and passing parameter into them via Custom Action
Hello,
I am using InstallShield 2011 Premier and Visual studio 2010 to develop an installer to install some management pack in System Center Operations Manager 2007 R2. Earlier I was using Visual Studio 2010 to build this installer and now I want to use Installshield.
As I was implementing this installer in VS2010 (VB.NET), I was passing parameters into installer class via custom actions (for Install, rollback and uninstall). For install i have 12 custom actions whose parameters are changing according to installed files. Same thing I want to do this in IS2011.
I am developing installer in Visual Studio by adding IS project with other .Net projects. Till now I have implemented separate Components for all files (making all of them as Key File). I also created component for .Net installer class using its Primary Output named "MYMPProject.Primary_output" (so that dll will get loaded in runtime itself).
Now, I set
.net Scan at build : "only Property"
.net Installer class: Yes
doing this, I get "Error 1001." only without any info while running setup.exe
and if I do .net Installer class: No, then I get some other error.
In case of custom action: I am using
For setting a property: Custom action name= CA_Install.SetProperty
Type:"Set a property"
Source: CA_Install.Install
Target: /installtype=notransaction /action=install /machine="[INSTALLMACHINE]" /mp="MYMP" /targetdir="[INSTALLDIR]\"
Execution Scheduling: Always execute
Sequence: After StartServices
Condition:
For Calling a function in Windows Installer DLL
Custom action name= CA_Install.Install
Type: "Call a function in Windows Installer DLL"
Location: "Installed with the product"
Source: MYMPProject.Primary_output
Target: ManagedInstall
In-Script Execution: Deferred Execution in system context
Sequence: After CA_Install.SetProperty
Condition:
Now I am getting "Error 1001." twice only with no info and then setup rollbacks.
I don't know how to solve this issue? Is this the right way to setup custom action or i have to implement it otherwise(i don't want to do any Installscript)?
Please guide me(if possible i want detailed help as i am beginner to InstallShield). I also want write rest of the custom actions (for install 12, for rollback 2 ans for uninstall 8). Please guide me how to do this? What will be the sequencing of Custom actions.
I am using InstallShield 2011 Premier and Visual studio 2010 to develop an installer to install some management pack in System Center Operations Manager 2007 R2. Earlier I was using Visual Studio 2010 to build this installer and now I want to use Installshield.
As I was implementing this installer in VS2010 (VB.NET), I was passing parameters into installer class via custom actions (for Install, rollback and uninstall). For install i have 12 custom actions whose parameters are changing according to installed files. Same thing I want to do this in IS2011.
I am developing installer in Visual Studio by adding IS project with other .Net projects. Till now I have implemented separate Components for all files (making all of them as Key File). I also created component for .Net installer class using its Primary Output named "MYMPProject.Primary_output" (so that dll will get loaded in runtime itself).
Now, I set
.net Scan at build : "only Property"
.net Installer class: Yes
doing this, I get "Error 1001." only without any info while running setup.exe
and if I do .net Installer class: No, then I get some other error.
In case of custom action: I am using
For setting a property: Custom action name= CA_Install.SetProperty
Type:"Set a property"
Source: CA_Install.Install
Target: /installtype=notransaction /action=install /machine="[INSTALLMACHINE]" /mp="MYMP" /targetdir="[INSTALLDIR]\"
Execution Scheduling: Always execute
Sequence: After StartServices
Condition:
For Calling a function in Windows Installer DLL
Custom action name= CA_Install.Install
Type: "Call a function in Windows Installer DLL"
Location: "Installed with the product"
Source: MYMPProject.Primary_output
Target: ManagedInstall
In-Script Execution: Deferred Execution in system context
Sequence: After CA_Install.SetProperty
Condition:
Now I am getting "Error 1001." twice only with no info and then setup rollbacks.
I don't know how to solve this issue? Is this the right way to setup custom action or i have to implement it otherwise(i don't want to do any Installscript)?
Please guide me(if possible i want detailed help as i am beginner to InstallShield). I also want write rest of the custom actions (for install 12, for rollback 2 ans for uninstall 8). Please guide me how to do this? What will be the sequencing of Custom actions.
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 21, 2011
02:26 PM
You really want to google Windows Installer XML (WiX) Deployment Tools Foundation (DTF ). It's a much better way to write managed custom actions and works well with InstallShield to boot.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 21, 2011
05:29 PM
I am in agreement that moving away from Installer Classes is the way to go, be it InstallShield's built-in support for calling a class in an assembly, or DTF custom actions.
Of the many reasons, the biggest I can think of is that they are difficult to troubleshoot since any error gets passed back as Error -1001 from the Microsoft Custom Action library InstallShield uses (installutillib.dll).
Now, as far as helpful hints on the problem you're actually facing at the moment, I would recommend first not messing with those two custom actions; IS will populate entrypoints into InstallUtilLib.dll.
On that note, make sure under Tools -> Options -> .Net you've got the right version of this *.dll for the framework you're building the custom action with. Otherwise this won't work. Also, if you can, write some debug code that writes to your own *.logfile under %TEMP%. This is the best way to see if there's something wrong with the custom action, or with your code (by virtue of if the log is created or not).
If all else fails, sometimes you get some exception info in the log, so this wouldn't hurt to post if you still get error -1001.
Hope this helps!
Of the many reasons, the biggest I can think of is that they are difficult to troubleshoot since any error gets passed back as Error -1001 from the Microsoft Custom Action library InstallShield uses (installutillib.dll).
Now, as far as helpful hints on the problem you're actually facing at the moment, I would recommend first not messing with those two custom actions; IS will populate entrypoints into InstallUtilLib.dll.
On that note, make sure under Tools -> Options -> .Net you've got the right version of this *.dll for the framework you're building the custom action with. Otherwise this won't work. Also, if you can, write some debug code that writes to your own *.logfile under %TEMP%. This is the best way to see if there's something wrong with the custom action, or with your code (by virtue of if the log is created or not).
If all else fails, sometimes you get some exception info in the log, so this wouldn't hurt to post if you still get error -1001.
Hope this helps!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 21, 2011
11:41 PM
Hey Cary,
Thanks for your valuable suggestions.
Ya I have checked the .Net version and set it to v2.0.50727 and also I have also set "_isconfig.xml" accordingly.
Does making .Net installer class to "Yes" create this error? How can I bypass it?
Is there any other way to do all these around. I mean creating an installer with different approach using Basic MSI project?
Thanks for your valuable suggestions.
Ya I have checked the .Net version and set it to v2.0.50727 and also I have also set "_isconfig.xml" accordingly.
Does making .Net installer class to "Yes" create this error? How can I bypass it?
Is there any other way to do all these around. I mean creating an installer with different approach using Basic MSI project?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 22, 2011
12:09 PM
InstallShield also now natively supports calling .Net custom actions:
Our documentation on this links off of the Custom Action Types document:
kb.flexerasoftware.com/doc/Helpnet/installshield18helplib/CATypes.htm
Our documentation on this links off of the Custom Action Types document:
kb.flexerasoftware.com/doc/Helpnet/installshield18helplib/CATypes.htm