logo
down
shadow

Pass MSI parameters to .NET installer class


Pass MSI parameters to .NET installer class

By : user3863162
Date : January 02 2021, 06:48 AM
will help you In InstallShield | Component Properties, right below where you said .NET Installer Class = Yes you put in your .NET Installer Class Arguments. You basically do something like
/INSTALLDIR="[INSTALLDIR]\" /FOO=42
code :


Share : facebook icon twitter icon
Is there a way to pass parameters to the marketplace installer for an app

Is there a way to pass parameters to the marketplace installer for an app


By : ezz_amine
Date : March 29 2020, 07:55 AM
help you fix your problem This is possible only for the use case of referral tracking, using the Analytics Tracking for Mobile Apps SDK. The documentation will have more details, but the basic steps are:
Create referral-tagged market deep link URLs using this tool. Use these links on web sites that you want to track referrals from. When a user downloads your app using the referral link, the referral info is stored. Upon first run of your app, use the Analytics SDK to track a 'first-run event' using trackEvent. If your app was downloaded with referral info, this event (and all future event and pageview tracking) will be tagged with the referral info. In Analytics, you'll be able to filter these events on campaign/referral info.
How to pass parameters in windows service from Installer to Main function in Program.cs?

How to pass parameters in windows service from Installer to Main function in Program.cs?


By : Nitin Sinha
Date : March 29 2020, 07:55 AM
will help you Parameters you send using ServiceController.Start() method are available to you as parameters to the OnStart() method. If I'm not mistaken (It's been a while since I needed to do this).
The OnStart method's signature is:
code :
OnStart(string[] args)
Installer class that receives parameters used in the 'Install' method

Installer class that receives parameters used in the 'Install' method


By : deep66
Date : March 29 2020, 07:55 AM
may help you . * Solution *
Here is the solution I found, indeed according the link I have displayed above:
code :
public override void Uninstall(System.Collections.IDictionary stateSaver)
{
    string userName = this.Context.Parameters["UserName"];
    if (userName == null)
    {
        throw new InstallException("Missing parameter 'UserName'");
    }

    string password = this.Context.Parameters["Password"];
    if (password == null)
    {
        throw new InstallException("Missing parameter 'Password'");
    }

    _process = new ServiceProcessInstaller();
    _process.Account = ServiceAccount.User;
    _process.Username = userName;
    _process.Password = password;
    _service = new ServiceInstaller();
    _service.ServiceName = _serviceName;
    _service.Description = "My service description";
    _service.StartType = ServiceStartMode.Automatic;
    Installers.Add(_process);
    Installers.Add(_service);

    base.Uninstall(stateSaver);
}
Pass arguments to Installer Class of Windows Service with WiX

Pass arguments to Installer Class of Windows Service with WiX


By : Manage Miller
Date : March 29 2020, 07:55 AM
wish helps you It's unlikely you'll get this to work. The issue is that Visual Studio installer classes are not called directly by Windows Installer. There's an undocumented interface that calls a C++ Dll that then calls your assembly and installer class via reflection. VS generates a call to this C++ Dll passing some undocumented parameters concatenated with your string. I don't know what you've tried, but unless you have reverse engineered these calls and inluded the C++ Dll, figured out the Dll entrypoints and parameters then it won't work.
The short answer is don't bother. Installer classes are only a Visual Studio thing, which is why they don't migrate. WiX has support for C# custom actions (see things like WIX - Adding a C# custom action code ) and get away from installer classes.
How do I pass parameters to the installer in a Chocolatey package?

How do I pass parameters to the installer in a Chocolatey package?


By : Krisna Meneice
Date : March 29 2020, 07:55 AM
wish help you to fix your issue If you are passing to the native installer, please use --install-arguments and not --package-parameters.
https://chocolatey.org/docs/commands-install#options-and-switches
code :
 --ia, --installargs, --installarguments, --install-arguments=VALUE
 InstallArguments - Install Arguments to pass to the native installer in 
   the package. Defaults to unspecified.

-o, --override, --overrideargs, --overridearguments, --override-arguments
 OverrideArguments - Should install arguments be used exclusively without 
   appending to current package passed arguments? Defaults to false.

 --params, --parameters, --pkgparameters, --packageparameters, --package-parameters=VALUE
 PackageParameters - Parameters to pass to the package. Defaults to 
   unspecified.
shadow
Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk