473,657 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I get the application directory

3 New Member
with windows o/s, C++, using mfc or not, how do I programmaticall y get the directory the running application resides in? GetCurrentDirec tory is unreliable because if the user starts the application with a shortcut on the desktop without a 'Start In' directory property, the directory I want is incorrect.
Sep 14 '07 #1
4 10295
sicarie
4,677 Recognized Expert Moderator Specialist
What do you mean by "the running application"? Your app? The current app in focus? If it is your app, I believe you can use the Win32 API to search for the location of the name of your executable.
Sep 16 '07 #2
xoinki
110 New Member
hi,
use getmodulefilena me()
xoinki
Sep 17 '07 #3
webster1766
3 New Member
What do you mean by "the running application"? Your app? The current app in focus? If it is your app, I believe you can use the Win32 API to search for the location of the name of your executable.
Sorry for being unclear. Yes, it's my application. Is getmodulefilena me() the Win32 API call you're referring to?
Sep 20 '07 #4
webster1766
3 New Member
hi,
use getmodulefilena me()
xoinki
That was what I needed. Thanks a million!
Sep 20 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1846
by: Dennis | last post by:
Hi, I am wondering that the Application Name in Virtual Directory is compulsory be non-empty field when configuring Virtual Directory for ASP.NET application? I realized some of my ASP.NET applications can run with empty Application Name, but some cannot. Is the Application Name must be same as the xxx.DLL file name in BIN folder and Inherits="xxx.Login" in aspx? (xxx is the name I am referring to)?
5
3665
by: Leszek | last post by:
Hello, Could anybody explain what's a difference between a virtual directory and an application root under IIS? I'm a little bit confused. This is mu problem: Let's assume the following directory structure: FileManager (application name a.k.a. virtual directory?)
9
1888
by: Wayne Wengert | last post by:
I built an ASP application and it runs fine on my local IIS. I am trying to move the application to my web service (ISP) out on the internet. I've read several of the help articles but they all seem to think I am deploying to localhosts. I created a new directory on my web page and copied most of the files from the wwwroot subdirectory where my project exists. When I try to open the page (by pointing to "WebForm1.aspx in the new...
10
1802
by: Steve Taylor | last post by:
I am having trouble understanding the ASP.NET application boundaries. Here's my setup: 1. Win2003 Server with IIS 6 and an application defined at the root "SalesNow" (www.salesnow.com). 2. A Default.aspx at the root which redirects the user to "Pages/Main.aspx" using javascript window.location. 3. On the Pages/Main.aspx page a HyperLink control which I add a javascript onclick event which does the following: - NewLeadWin =...
21
2162
by: Chris | last post by:
I'm trying to get an existing VS.NET project up on my Win2003 server and I get the following error (on the actual website page): "It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS." I've been told by the previous developer that the website needs to be set as a "application". I...
9
1312
by: Andy Sutorius | last post by:
Hi, Do you always have to make a folder an application if you have a web.config in that folder? Thanks, Andy
6
4555
by: Martin Bischoff | last post by:
Hi, I'm creating temporary directories in my web app (e.g. ~/data/temp/temp123) to allow users to upload files. When I later delete these directories (from the code behind), the application restarts and all active sessions are terminated. This error is also described in detail here:...
7
2081
by: Rabbit | last post by:
Dear all, Does anyone know how to resolve following setup problem, I developed my application(using .net 2.0) which will connect Access database on my Win XP, everything works fine, but when I place the web folder onto my Win 2003 server, set up a virtual directory as web application, the following error message came up. Server Error in '/WebApp' Application.
5
1430
by: Oriane | last post by:
Hi, I'm developinf an Asp.Net 3.5 site on W2k3, and I use a Web application Visual Studio 2008 project. This Web app is configured on IIS 6 as an "application" under a web site. When I start an aspx page from IIS (or directly on the navigator), I get an error about the <system.websection in the web.config file. Something like: using a section registered as allowDefinition="MachineToApplication" beyond the application level is an...
1
1519
by: =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?= | last post by:
For in-house tools, the approach of writing to the program files folder is fine. Here are a few ways that it can be problematic if the code goes out of your team, such as to a customer: 1. Vista - Must run with elevated permissions to access program files folder. 2. 64 bit OS - Virtualization pottentially renames the folder, so you better not assume it is c:\program files. 3. XP - Most organizations don't allow users admin priveledge,...
0
8395
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7330
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.