From: "Campbell, Rolf [SKY:1U32:EXCH]" Newsgroups: comp.os.msdos.djgpp,comp.os.msdos.programmer Subject: Re: Detecting Windows and Windows directory from DOS Date: Fri, 17 Mar 2000 10:16:49 -0500 Organization: Nortel Networks Lines: 31 Message-ID: <38D24C61.8011F3D6@americasm01.nt.com> References: <8am5ub$o0v$1 AT news6 DOT svr DOT pol DOT co DOT uk> <38D108E3 DOT D9821E3B AT americasm01 DOT nt DOT com> <8arkm8$m3h$1 AT newsg2 DOT svr DOT pol DOT co DOT uk> NNTP-Posting-Host: wmerh0tk.ca.nortel.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.72 [en] (X11; I; HP-UX B.10.20 9000/785) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Damian Yerrick wrote: > >>You can get the windows directory in the 'windir' environment variable, > >>but the location of the Start Menu is stored in the windows registry, > >>so if somebody moves their Start Menu, > Unlikely. I agree, but i really hate programs that install things in the wrong location. Example: I had windows installed on my "D:" drive once, and I noticed that many programs still tried to install into "C:\Program Files". That is also movable and on my machine was "D:\Program Files". > >>then your program would fail to add to it. > Installer: "If you've moved your Start Menu folder, > you will have to add the shortcut manually." That would be acceptable... > >All right. How do I read the Windows registry from a DOS program (if it's > >possible)? > That's what I've been wondering. Why doesn't it just store > its registry as text like GNU/Linux does? Disclaimer: I'm not an advocate of the Win32 registry. Accessing data in the registry is _far_ faster than parsing a text file. -- (\/) Rolf Campbell (\/)