Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ogicse!plains!coffman From: coffman@plains.NoDak.edu (Clark Coffman) Newsgroups: comp.windows.ms Subject: Re: PATH for Windows applications Summary: How about argv[0]? Message-ID: <10816@plains.NoDak.edu> Date: 12 Jun 91 16:50:15 GMT References: <1991Jun6.095516.86840@vaxc.cc.monash.edu.au> Organization: North Dakota State University, Fargo, ND Lines: 32 In article <1991Jun6.095516.86840@vaxc.cc.monash.edu.au> hadgraft@vaxc.cc.monash.edu.au (Hadgraft) writes: [One of the things I find annoying about most major Windows applications, is that [their directories must be included in the PATH. If you use a number of them, [your PATH gets quite long. There is such a simple solution to this problem, that [I can't believe that so many developers don't use it. All an application has to [do is store the home directory in WIN.INI or its own .INI file. Problem solved. [.................... You know, that would work, but I've always wondered why professional programmers don't use argv[0] to find the path! I'm what my friends call a sportsman programmer in C and I use argv[0] to find where my programs have been started up (so they can find their configuration files). Why don't others use this? It returns the full path, including the drive, to where ever the user has stored your program. I guess I'm assuming that Pascal and other languages have a similar feature? Oh well, just wondering. I haven't tried this in windows' programming yet, it seems to be available, is it? Merry computing all!! ___________________________________________________________________ | Hey, who else would you expect to be responsible for what I say? | <===================================================================>__ | (Bitnet) -- NU116215@NDSUVM1 -- coffman@plains |..| | (Internet) -- NU116215@VM1.NODAK.EDU -- coffman@plains.nodak.edu |==> | (UUCP) -- uunet!plains!coffman |..| | |..| | Clark W. Coffman --)------ Dagda Mor ------)-- CWC |. | | |. .| |______:-: You Teach Best What You Most Need To Learn. :-:______|.. | | .... .. . .... .. .. ..... . .. ..... ... .... . .. ..... | |______________:-: "Richard Bach" :-:___________________________|