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

  • Home
  • SEARCH
  • 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 7672249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:14:32+00:00 2026-05-31T16:14:32+00:00

I try to call the esriRegAsm.exe with arguments from a C# program. The purpose

  • 0

I try to call the esriRegAsm.exe with arguments from a C# program.
The purpose is to register a Dll. Therefore I usually call the esriRegAsm.exe with the Dll as argument plus some additional parameters (/p:Desktop /s). This works fine if I type it into cmd.exe. Somehow I think that the process sends only the first string to the cmd and not the whole argument list, but I need the “” for the space character in the paths.
For debugging I added a message box and the strings seems to be okay.

Backslash or double backslash seems to be unimportant.

        string targetDir = this.Context.Parameters["targ"];
        string programFilesFolder = this.Context.Parameters["proFiles"];

        System.Diagnostics.Process process = new System.Diagnostics.Process();
        System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
        startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
        startInfo.FileName = "cmd.exe";
        startInfo.Arguments = "/C \"" + programFilesFolder + "Common Files\\\\ArcGIS\\\\bin\\\\esriRegAsm.exe\" " + "\"" + targetDir + "RArcGISTest.dll\"  /p:Desktop /s";
        MessageBox.Show("/C \"" + programFilesFolder + "Common Files\\\\ArcGIS\\\\bin\\\\esriRegAsm.exe\" " + "\"" + targetDir + "RArcGISTest.dll\"  /p:Desktop /s");
        process.StartInfo = startInfo;
        process.Start();

As I cannot attache a picture of the message box… the output is:

/C “C:\Program Files (x86)\Common Files\ArcGIS\bin\esriRegAsm.exe” “C:\install\RArcGISTest.dll” /p:Desktop /s”

  • 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-31T16:14:33+00:00Added an answer on May 31, 2026 at 4:14 pm

    Why are you double-escaping things, and why are you routing it through cmd.exe? Just execute the process directly:

    string targetDir = this.Context.Parameters["targ"];
    string programFilesFolder = this.Context.Parameters["proFiles"];
    
    Process process = new Process();
    ProcessStartInfo startInfo = new ProcessStartInfo();
    startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
    startInfo.FileName = Path.Combine(programFilesFolder, @"Common Files\ArcGIS\bin\esriRegAsm.exe");
    startInfo.Arguments = "\"" + Path.Combine(targetDir, "RArcGISTest.dll") + "\" /p:Desktop /s";
    process.StartInfo = startInfo;
    process.Start();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to call *100# with the adb.exe program. I type the following in
I try to call a function which passed as function pointer with no argument,
whenever I try to call my ejb from a client, I get this error
Update getting error when i try to call the method from Activity: SQLiteDatabase db
I try to call the code from this link https://stackoverflow.com/a/9100406/942113 with gwt jsni. My
I try to call a DllImport on the following Alsa function (from the documentation
I'm having a problem when I try to call a Matlab funcion from my
I try to call FSDirectory.open FSDirectory.open(File.open('index', 'w+')) NameError: no method 'open' for arguments (org.jruby.RubyFile)
If I set a function to Object.prototype, and try to call the function from
I try to call methods from klipper bus with python. But I could not

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.