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 8875569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:00:24+00:00 2026-06-14T19:00:24+00:00

Hi I have these two binary files: <Binary Id=Sentinel SourceFile=sentinel_setup.exe/> <Binary Id=Hasp SourceFile=HASPUserSetup.exe/> And

  • 0

Hi I have these two binary files:

<Binary Id="Sentinel" SourceFile="sentinel_setup.exe"/>
<Binary Id="Hasp" SourceFile="HASPUserSetup.exe"/>

And I would like to start them on a button click like so:

<CustomAction Id="LaunchHasp" BinaryKey="Hasp" ExeCommand="" Return="asyncWait" />
<CustomAction Id="LaunchSentinel" BinaryKey="Sentinel" ExeCommand="" Return="asyncWait"/>

<Publish Event="DoAction" Value="LaunchHasp">1</Publish>

But it doesn’t work, It only works when I run the installer from the command line with elevated privileges. What am I doing wrong? Thanks

Or can someone tell me how I could extract the file from the binary table using a c++ custom action as I cannot get it working at all..:(

  • 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-06-14T19:00:26+00:00Added an answer on June 14, 2026 at 7:00 pm

    Immediate custom actions doesn’t have elevated privileges. You should use deffered custom actions for such needs. Any action that make changes to the destimation environment should be deffered. For more details read this article: http://bonemanblog.blogspot.com/2005/10/custom-action-tutorial-part-i-custom.html

    <CustomAction Id="LaunchHasp" Impersonate="no" Execute="deferred" BinaryKey="Hasp" ExeCommand="" Return="asyncWait" />
    

    Though deffered custom actions are executed during installation phase, not on button click. Revise your installer logic. As I understand, your exe file “sentinel_setup.exe” changes the system, so should be scheduled between InstallInitialize and InstallFinalize events in InstallExecuteSequence

    I would recommend adding a checkbox, that user should mark to install your “Hasp” (or installer Feature which user should select in the feature tree). And add deffered custom action with condition on this checkbox state.

    Sometimes it is really required to launch admin actions during or before installer UI sequence. In this case you need to create a setup bootstrapper which asks for permission elevation and does required actions before running MSI process. To ask for permissions you need to add application manifest to your bootstrapper project. My bootstrapper is quite simple, but works in many cases. It is Windows application (though without any Windows forms – it allows to hide console window) which contains only icon, application manifest and small code file:

    using System;
    using System.Diagnostics;
    using System.IO;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    
    namespace SetupBootstrapper
    {
        class Program
        {
            [STAThread]
            static void Main(string[] args)
            {
                var currentDir = AppDomain.CurrentDomain.BaseDirectory;
                var parameters = string.Empty;
                if (args.Length > 0)
                {
                    var sb = new StringBuilder();
                    foreach (var arg in args)
                    {
                        if (arg != "/i" && arg != "/x" && arg != "/u")
                        {
                            sb.Append(" ");
                            sb.Append(arg);
                        }
                    }
                    parameters = sb.ToString();
                }
    
                bool isUninstall = args.Contains("/x") || args.Contains("/u");
    
                string msiPath = Path.Combine(currentDir, "MyMsiName.msi");
    
                if(!File.Exists(msiPath))
                {
                    MessageBox.Show(string.Format("File '{0}' doesn't exist", msiPath), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
    
                string installerParameters = (isUninstall ? "/x" : "/i ") + "\"" + msiPath + "\"" + parameters;
    
                var installerProcess = new Process { StartInfo = new ProcessStartInfo("msiexec", installerParameters) { Verb = "runas" } };
    
                installerProcess.Start();
                installerProcess.WaitForExit();
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have these two images. And... I made them into graysclae images and then
I have two binary files with different sizes. I need to compare first N
Suppose I have five binary files on disk. These five files encode sequences of
I have two binary files (order of tens of MB) and I want to
I have two binary files, bigFile.bin and smallFile.bin . The bigFile.bin contains smallFile.bin .
I have these two lines in my web.xml <url-pattern>/</url-pattern> : Index Servlet and <url-pattern>/login</url-pattern>
I have these two tables people ============ id, name and answer_sheets ============ id, person_id,
I have these two modules : package G1; sub new { my $class =
I have these two classes public class Person { } public class Company {
I have these two situations: String s = aa; s = s + aa;

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.