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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:40:51+00:00 2026-05-23T11:40:51+00:00

I have an application that starts an SFX (self-extracting executable) file and extracts it.

  • 0

I have an application that starts an SFX (self-extracting executable) file and extracts it.

The input file is located at c:\sfx\sfx.exe but it currently extracts to my application’s start up folder (c:\myapp\,) rather than where it is stored (c:\sfx\.)

How can I alter where the output goes?

  • 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-23T11:40:52+00:00Added an answer on May 23, 2026 at 11:40 am

    When you start an application, the ‘working directory’ is the directory from which you start it (unless explicitly specified otherwise.) You can change this, however, using SetCurrentDirectory of the Directory class.

    An example from the referenced MSDN page:

    string dir = @"C:\test";        
    try
    {
        //Set the current directory.
        Directory.SetCurrentDirectory(dir);
    }
    catch (DirectoryNotFoundException e)
    {
        Console.WriteLine("The specified directory does not exist. {0}", e);
    }
    // Print to console the results.
    Console.WriteLine("Root directory: {0}", Directory.GetDirectoryRoot(dir));
    Console.WriteLine("Current directory: {0}", Directory.GetCurrentDirectory());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application right now that starts a process, then opens a file
I have couple resource DLLs that I currently load when application starts using following
We currently have an application that starts its own background services to manage syncing
I have a service application that on startup reads an XML file and starts
I have an application that starts playing a sound when user touches the uiview
I am using Visual C# Express 2008 and I have an application that starts
I have an application that when it first starts i need it to run
I have an application in vb.net that starts with a sub function do some
I have C# winforms application that needs to start an external exe from time
I have an android application that starts an activity and is running well. I

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.