473,396 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Current Application Directory

Why, when I start my app by dragging a file onto it, does
System.IO.Directory.GetCurrentDirectory() return "C:\Program Files\Common
Files\System\Mapi\1033"??

And how do I get the Current Directory (the one my app is sitting in) if I
start my app by dragging a file onto it?

I have scoured the msdn and googled for an too long. Please help.
Nov 22 '05 #1
2 2191
It turns out I should have been using Application.ExecutablePath to get the
executable directory.

I still wouldn't mind knowing why the current directory is set to C:\Program
Files\Common Files\System\Mapi\1033 though.

"Casey Motherway" <ca*************@autodesk.com> wrote in message
news:eD**************@tk2msftngp13.phx.gbl...
Why, when I start my app by dragging a file onto it, does
System.IO.Directory.GetCurrentDirectory() return "C:\Program Files\Common
Files\System\Mapi\1033"??

And how do I get the Current Directory (the one my app is sitting in) if I
start my app by dragging a file onto it?

I have scoured the msdn and googled for an too long. Please help.

Nov 22 '05 #2
It turns out I should have been using Application.ExecutablePath to get the
executable directory.

I still wouldn't mind knowing why the current directory is set to C:\Program
Files\Common Files\System\Mapi\1033 though.

"Casey Motherway" <ca*************@autodesk.com> wrote in message
news:eD**************@tk2msftngp13.phx.gbl...
Why, when I start my app by dragging a file onto it, does
System.IO.Directory.GetCurrentDirectory() return "C:\Program Files\Common
Files\System\Mapi\1033"??

And how do I get the Current Directory (the one my app is sitting in) if I
start my app by dragging a file onto it?

I have scoured the msdn and googled for an too long. Please help.

Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: EAS | last post by:
Does anyone know how to display the current directory using DOS and/or Python? I already tried os.pardir and os.curdir in Python, but all they return are a couple of periods... >>>import os...
1
by: Casey Motherway | last post by:
Why, when I start my app by dragging a file onto it, does System.IO.Directory.GetCurrentDirectory() return "C:\Program Files\Common Files\System\Mapi\1033"?? And how do I get the Current...
3
by: Daniel | last post by:
How do you get the current directory of the actual .exe file (not the file name but the directory it is in) ? These do not work: System.IO.Directory.GetCurrentDirectory() - returns system...
4
by: Jon Rea | last post by:
Hi, Just a quickie ... I thought that Directory.GetCurrentGirectory(), unless the current directory had been changed by the program, would always point to the directory where the .exe for the...
4
by: Kristof Despiere | last post by:
Suppose you have one domain, filled with a couple of users. What needs to be done now is I need to start a windows application from a webform by pressing a button on the webform (for example). ...
3
by: Poppy | last post by:
Whenever I use "Directory.getcurrentdirectory" I always get "C:\WINDOWS\system32" despite the fact that the code is running from a subdirectory of wwwroot. Can someone help ? How can I get...
3
by: Progman | last post by:
I use Visual Studio 2005 When I run msgbox Curdir(), I get the visual studio directory. This problem seems to be only in the VB part. In the ASP, we use ~/etc... to access files. Why I...
9
by: pdmountaineer | last post by:
hi all, I made an application in MATLAB, but to make code fast and efficient, I use ANSI C routines, which I compile under MATLAB as MEX files (MATLAB executables). To protect my C routines,...
3
by: Chris Mellon | last post by:
This appears to be a change in behavior from Python 2.4 to Python 2.5, which I can't find documented anywhere. It may be windows only, or related to Windows behavior. In 2.4, the current...
2
by: Kakkanattu | last post by:
Hi, In desktop application, we use different ways to get the current execution directory. I. AppDomain.CurrentDomain.BaseDirectory II. Environment.CurrentDirectory...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.