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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:23:35+00:00 2026-06-07T07:23:35+00:00

I am working on a c# program that needs to be compatible with Windows

  • 0

I am working on a c# program that needs to be compatible with Windows and Linux (Mono).

I am trying to create a symbolic link in both platforms and I am using ProcessStartInfo in order for this to work. I haven’t tried this on Linux yet but on Windows I am using the following code

ProcessStartInfo process = new ProcessStartInfo();

                    process.CreateNoWindow = true;
                    process.UseShellExecute = false;
                    process.FileName = "mklink";
                    process.WindowStyle = ProcessWindowStyle.Hidden;
                    process.Arguments = "/D " + webFolder + "MyFolder" + webFolder + "MyFolder_" + version;
                    Process.Start(process);

When I run the above code I get

System.ComponentModel.Win32Exception: The system cannot find the file
specified

If I run mklink in command prompt it works fine.

I’ve had a look on Google and it says about doing a [DllImport(“kernel32.dll”)] but this isn’t going to work on Linux.

Thanks for any help you can provide.

  • 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-07T07:23:38+00:00Added an answer on June 7, 2026 at 7:23 am

    mklink is a command of the cmd.exe program, not a stand-alone program.

    To run mklink, you have to actually invoke cmd.exe with an appropriate set of parameters, like this:

    ProcessInfo = new ProcessStartInfo("cmd.exe", "/c mklink " + argumentsForMklink);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a program that needs to create a multiple temporary folders
I am working on a program that needs to calculate the sum of 2
I am working on a php program that needs to store many Event objects
I'm working on a program that accesses StarTeam using the StarTeam SDK for .NET.
I'm working on a Java program that needs to send an image (preferably in
I'm working on a program that needs to edit some objects in an Access
I'm working on a program that needs to be able to load object-properties from
I'm working on a little program that needs to pipe binary streams very closely
I'm working on a program, that needs to load data from a text file
I'm working on a system that was developed for linux and that needs the

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.