473,320 Members | 1,857 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,320 software developers and data experts.

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

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
2 1149
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: GO | last post by:
I have a custom Perl application (programmed by myself) that is used to rename files. For some reason, within the last month, it is no longer working properly. Prior to this I've been using it for...
0
by: atlantis | last post by:
Hi, I have a very strange problem with xsl:import when usig RELATIVE path on AIX 5.2 server. I have two XSL files in the same directory: "ists_xslt3.xsl" and "ists_xslt3_layout.xsl". This...
6
by: Sunny | last post by:
Hi, I have a very serious issue at hand. I have created a small C# Console App (Csd.exe) that collects a list of files as its argument and generates their Md5 sets. This application is used by...
8
by: Hardy Wang | last post by:
Hi: Is it possible for me to create/open web application from remote machine other than port 80? And create application directly under virtual web site instead of creating a virtual directory?...
9
by: Roni Burd | last post by:
Hi!, I'm having a strange issue while deploying a web site with Validator controls. In my development machine the Validators function perfecly and also when I deploy using XCOPY to a web server....
5
by: Nathan Sokalski | last post by:
I am creating an ASP.NET application in a subdirectory of what IIS uses as the root directory (C:\Inetpub\wwwroot\). I am using the version of IIS that comes with Windows XP Pro SP2. Some of my...
2
by: ELINTPimp | last post by:
Hello all, Have a really interesting problem (at least to me) with my upload_file() function. I have it working now, with a bit of a work around, but would like to know what everyone thinks in...
3
by: TS | last post by:
I am using IE 7. I have a website running on my local machine (localhost) and auto complete doesnt work for any of the textboxes, but going to web sites on the internet does support this so i know...
6
by: josequinonesii | last post by:
I've searched, I've read, I've tested and re-read numerous post but to no avail yet... Quite simply, the settings I've applied to my httpd.conf, httpd-vhost.conf and my hosts files simply does not...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.