[Incident]: Some users report they are unable to access the case portal. Please see this community notice for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create 64 bit .NET Application for testing managed code custom action

Create 64 bit .NET Application for testing managed code custom action

Summary

Use Visual Studio 2010 to construct 64 bit .NET Application(exe/dll) for testing managed code custom action.

Synopsis

Use Visual Studio 2010 to construct 64 bit .NET Application(exe/dll) for testing managed code custom action.


Discussion

Enable Visual Studio to build 64-bit
(1) Perform a full installation of Visual Studio 2010 or, during a Custom installation, select the x64 Compilers and Tools check boxes. You can expect to find 64-bit versions of some components, and also use tools that are specific to 64-bit development when performing the full install of Visual Studio 2010.

Explicitly set 64-bit platform using sample shipped with InstallShield 2010 and build sample
(2) Open Visual Studio 2010
(3) Open sample solution: File | Open | Project/Solution | <path to installshield>\Samples\WindowsInstaller\Managed Custom Actions\SampleClassLibrary\SampleClassLibrary.sln
(4) Follow steps in Visual Studio Conversion Wizard
(5) Using the Visual Studio Solution Explorer, right click Solution, select 'Configuration Manager'.
(6) Go to 'Active Solution Platform' dropdown, select 'New'.
(7) In the 'New Solution Platform' dialog select 'New' platform 'x64'.
(8) Click OK
(9) Build solution (F7)
Add InstallShield project to solution
(10) Right Click Solution | Select 'Add' | New Project
(11) InstallShield 2010 Projects
(12) Select 'Basic MSI Project (InstallShield 2010 Projects)

Step: Add a feature and component
(13) Navigate to Organization | Setup Design
(14) Right click 'Setup Design' select 'New Feature'
(15) Right click 'NewFeature1' select 'New Component'
(16) Highlight 'Files' and add the sample managed dll file (SampleClassLibrary.dll) based on your solution build in step #9

Step: Add custom action
(17) Navigate to Behavior and Logic | Custom Actions and Sequences
(18) Right click 'Custom Actions'
(19) Select 'Custom Action Wizard'
(20) On the Action Type panel | Type dropdown select 'Call a public method in a managed assembly'
(21) On the Action Type panel | Location dropdown select 'Stored in the Binary table'
(22) On the Action Parameters panel Browse to the Source. This is expected to be the file built in step #9: <PATH_TO_DEBUG_FILES>\SampleClassLibrary.dll
(23) On the Managed Method Definition panel select 'Browse'
(24) Select 'SampleClassLibrary.SimpleWrapper' -> 'System.Windows.Forms.DialogResult Note(String caption, String message)
(25) Specify argument values [ProductName] for the parameter String caption
(26) Specify argument values 'Version [ProductVersion] installed by InstallShield' for the parameter String message
(27) On the Additional Options panel set Return Processing: Synchronous (Check exit code)
(28) On the Respond Options panel set In-Script Execution to Immediate Execution
(29) On the Respond Options panel set Execution Scheduling to Always Execute
(30) On the Insert into Sequence panel set Install UI Sequence to After Cost Finalize
(31) On the Insert into Sequence pane set the Install UI Condition to NOT Installed
(32) Select Finish
(33) Build solution

Note: [ProductName] is substituted and [ProductVersion] is not. This is because a simple property reference is retrieved, but a full string is not. The string is equivalent to the same one surrounded by double quotes ?Version [ProductVersion] installed by InstallShield? which will more clearly avoid any property substitution.
Labels (1)
Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Aug 03, 2010 04:33 PM
Updated by: