Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6705989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:28:03+00:00 2026-05-26T07:28:03+00:00

I have a standard visual studio setup project that I am converting to an

  • 0

I have a standard visual studio setup project that I am converting to an InstallShield LE project.

I have the following custom action under CustomActions-Install-PrimaryOutputFromMyProject(Active) – CustomActionData – /sectionName=”userSettings/SSE.My.MySettings” /provName=”DPAPIProtection”

How do I recreate this custom action in InstallShield?

Here is the code in my installer class all it does is protect some of the sections of the app.config file:

Imports System.ComponentModel
Imports System.Configuration.Install
Imports System.Configuration

'// This file encrypts the app.config file
Public Class CustomInstaller
    Inherits Installer
    Public Sub New()
        MyBase.New()

        'This call is required by the Component Designer.
        InitializeComponent()

        'Add initialization code after the call to InitializeComponent

    End Sub
    Public Overrides Sub Install(ByVal stateSaver As System.Collections.IDictionary)
        MyBase.Install(stateSaver)

        'get Configuration section 
        'name from custom action parameter
        Dim sectionName As String = Me.Context.Parameters("sectionName")

        'get Protected Configuration Provider 
        'name from custom action parameter
        Dim provName As String = Me.Context.Parameters("provName")

        ' get the exe path from the default context parameters
        Dim exeFilePath As String = Me.Context.Parameters("assemblypath")

        'encrypt the configuration section
        ProtectSection(sectionName, provName, exeFilePath)
    End Sub
    Private Sub ProtectSection(ByVal sectionName As String, ByVal provName As String, ByVal exeFilePath As String)
        Dim config As Configuration = ConfigurationManager.OpenExeConfiguration(exeFilePath)
        Dim section As ConfigurationSection = config.GetSection(sectionName)

        If Not section.SectionInformation.IsProtected Then
            'Protecting the specified section with the specified provider
            section.SectionInformation.ProtectSection(provName)
        End If
        section.SectionInformation.ForceSave = True
        config.Save(ConfigurationSaveMode.Modified)
    End Sub

End Class
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:28:04+00:00Added an answer on May 26, 2026 at 7:28 am

    You should read my augmenting series:

    Augmenting InstallShield using Windows Installer XML – Certificates

    Augmenting InstallShield using Windows Installer XML – Windows Services

    Basically I would do it this way:

    1) Refactor the code in your InstallerClass ( InstallUtil ) custom action into a WiX DTF custom action. This step is technically optional but if you know all the horrible things associated with InstallUtil you’d do it to.

    2) Author a WiX merge module to consume the DLL as a custom action and sequence it in the ModuleExecuteSequence table.

    3) Add the merge module to your InstallShield LE project.

    Note: InstallShield 2010LE is basically stripped-down-featureset-ware. You can use it for upgrade pricing of $1500 to InstallShield Professional edition. If you can justify this, I would do it. The reality is LE has some capabilities and I can think of some creative ways of augmenting it but it’s far easier to do in normal InstallShield.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a standard Visual Studio (2008) application setup project, which generates an msi
We have a main visual studio project stored in SVN using the standard trunk/branches/tags
What does Pro have that's not in Standard (or vice-versa)? I need Visual Studio
I have built a web setup project in Visual Studio. When it is installed
I have created an asp.net mvc2 project using the standard visual studio template which
Does VS2008 have somewhat C++0x standard support? DUPLICATE Visual Studio support for new C
I have a standard MSI being created using Visual Studio 2008. Is there any
I have a Visual Studio 2008 Windows Mobile 6 C++ application that is using
I have created a standard windows forms application in Visual Studio 2010. public ref
I have created a standard windows forms application in Visual Studio 2010. public ref

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.