By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,458 Members | 1,422 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,458 IT Pros & Developers. It's quick & easy.

How do I return the working directory used on my application from ashortcut

P: n/a
Hi Gang,

One of the properties of a shortcut is the working directory. I would
like to be able to detect and use whatever working directory the
shortcut specified. Can someone tell me how to find that out?

Thanks a Zillion,
Christian
Jul 13 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Gang,

Well nobody seemed to know this one and I found the answer myself. I
hope this proves useful for someone?

//Stores the path to the working directory
string strWorking_Directory;

//Detects the path to the working directory
strWorking_Directory = System.IO.Directory.GetCurrentDirectory();

Cheers,
Christian
Jul 13 '08 #2

P: n/a
Christian Blackburn wrote:
Well nobody seemed to know this one
You only waited two and a half hour (while night in the US
and very early Sunday morning in Europe).
//Stores the path to the working directory
string strWorking_Directory;

//Detects the path to the working directory
strWorking_Directory = System.IO.Directory.GetCurrentDirectory();
Strictly speaking current directory is not the same as the
working directory in the short cut. It will be when the app
startup, but the app could change current directory after that.

Arne
Jul 13 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.