• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 422
  • Last Modified:

Environment.CurrentDirectory not working over share using command line.

Hello all,

I have a C# program that works fine when I run it from a share using explorer, however, when I try running the program over the share from the command line I noticed my Environment.CurrentDirectory is failing. Is there an alternative that I can use to Environment.CurrentDirectory?

Thank you!
0
dwb178
Asked:
dwb178
1 Solution
 
SriVaddadiCommented:
Application.StartupPath
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
If you are running it via Process.Start() then try setting the Process.StartInfo.WorkingDirectory() Property to that of the executable.
0
 
dwb178Author Commented:
Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now