473,378 Members | 1,679 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,378 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 2189
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.