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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:54:25+00:00 2026-05-22T18:54:25+00:00

I want to install a MSI package on a remote computer. The local and

  • 0

I want to install a MSI package on a remote computer.
The local and remote computer both are members of a domain called “adn.lan”
and the user/password I pass as parameter to connection has full access to remote machine.
When I set connection.Authority to “ntdlmdomain:adran.lan” the return parameter shows the “Invalid parameter” and when I leave it as null and make it as remarked, the connect() would connect successfully but when it try to install package the return parameter shows that the addressed package is inaccessible.

Here is the code I’ve tried with.

ConnectionOptions connection = new ConnectionOptions();
//connection.Authority = "ntdlmdomain:adn.lan"; // "kerberos:" + domain + @"\" + machine;
connection.Username = username;
connection.Password = password;
//connection.Impersonation = ImpersonationLevel.Identify ;
connection.Authentication = AuthenticationLevel.Packet;

ManagementScope scope = new ManagementScope("\\\\RemoteMachineName\\root\\CIMV2", connection);
scope.Connect();

ManagementPath p = new ManagementPath("Win32_Product");                
ManagementClass classInstance = new ManagementClass(scope, p, null);
ManagementBaseObject inParams = classInstance.GetMethodParameters("Install");

inParams["AllUsers"] = true; 
inParams["Options"] = string.Empty;
inParams["PackageLocation"] = "\\\\LocalMachineName\\Share\\Prescription.msi";                

ManagementBaseObject outParams = classInstance.InvokeMethod("Install", inParams, null);                

string retVal = outParams["ReturnValue"].ToString();

When I set theconnection.Impersonation to Identity the result would be “Access denied”.

  • 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-22T18:54:26+00:00Added an answer on May 22, 2026 at 6:54 pm

    If I understand your question and followup comment, you found that it would not work when the package path was on a different machine than the target machine (i.e. a UNC path, normally accessible from the target machine). But the installation works when you copy the package to the target machine and pass a local path on the target machine.

    I believe the reason for the failure is due to the nature of DCOM impersonation levels.
    Impersonate allows you to use the credentials of the caller on the target machine — but not to connect from the target machine to another machine. To make that second hop using the same credentials requires Delegate level. (Problem is, that has security risks, so all the guidance says “warning warning warning” and everything makes it hard by default.)
    When you asked the target machine to access the installation package on a separate network location, that was a “second hop” which would require credentials, but impersonate meant you could only use your credentials on the target machine, not passed from there to the remote file location.

    TechNet has a nice summary of the impersonation levels, see Table 6.6 DCOM Impersonation Levels at the top of WMI Security Settings.

    p.s. For fun, you might see if there’s a way to do it without copying to the target machine. If you could find a way to expose the installation package file to the network in a way that allowed anonymous access, I wonder if that second hop would be allowed since only anonymous credentials were needed? Not sure though. And there might be an awful lot of guessing and testing going on, if you’re anything like me : )

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

Sidebar

Related Questions

I want to install MSI package under user level and set several registry keys
I have a vendor supplied MSI file, and we want to automate the install
I want to install a pastie in our local intranet. What are the alternatives
I want to install this python package: http://pypi.python.org/pypi/netifaces/0.5 But I don't know how and
Usually, when you install an MSI package on windows, it is installed using the
I have 2 projects. I want to create ONE single MSI setup package that
if i want to install a MSI, created by Visual Studio 2005, via Active
I want to install an outlook add-in for a user who does not have
I want to create a simple MSI to install some DLLs into programs, similar
I have a .msi to install a program. Upon 'update', I want to be

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.