Re: [ROOT] Winxx pathnames.

From: Valeri Fine (Faine) (fine@bnl.gov)
Date: Fri Feb 09 2001 - 17:24:12 MET


Hello, Nick

NT  provides so-called VDM - "Virtual Dos Machine". That has no equivalent
on Win 9x platforms.This Virtual machine is provided with the "fake"
autoexec.bat and config.sys as well for the sake of the backward
compatibility

Usually one finds no problem if he/she is only user of his/her NT box
and start his/her application from within VDM. By this reason I would
not advice to exploit this feature.

You method does work unless one runs ROOT outside of any VDM.
Since Win9x has no VDM it is free of this problem

By this reason:

The right way to do things is to edit the Windows NT registry.
This is the preferable way for Windows NT machines and the only
recommended way for machines those belong some Windows NT
Domain.



Windows NT helps says:

To change values of environment variables for your computer

1  Click here    to display System Properties.

2 On the Environment tab, click the name of the variable
   you want to change.
3 In the Value box, type a new value.
4 Click Set.

Notes and Tips

 To remove a variable completely, click it, and then click Delete.

 If you are not an administrator, you can change variables only
 in the User Variables box.

 Windows NT saves changes in the registry so they are available
  automatically the next time you start your computer.

 Changes don't affect programs that are running, and may not take
 affect until after you restart your computer.

 The path value is created by appending the path contained in
 the Autoexec.bat file to path definitions on the Environment tab
 of the System option in Control Panel.

"


  Valeri
----- Original Message -----
From: Nick van Eijndhoven <Nick@phys.uu.nl>
To: Valeri Fine (Faine) <fine@bnl.gov>
Cc: <Sajan.Easo@cern.ch>; ROOT discussion group <roottalk@pcroot.cern.ch>
Sent: 9 февраля 2001 г. 10:58
Subject: Re: [ROOT] Winxx pathnames.


> Hi Valeri,
> Strange, since my 'recipe' works also correctly on our NT and 2000 systems.
> Could be that we have old versions of these operating systems, since we mainly
> use laptops running win98. However, I would say that win2000 is rather new.
> So, I guess under winNt and win2000 both methods can be applied.
>
>                                                         Cheers,
>                                                          Nick.
>
> --
> Dr. Nick van Eijndhoven mailto:nick@phys.uu.nl http://www.phys.uu.nl/~nick
> --------------------------------------------------------------------------
> Org.:    Utrecht University/Nikhef, Department of Subatomic Physics
> Address: P.O. Box 80.000, NL-3508 TA Utrecht, The Netherlands
> Phone:   +31-30-2532331(direct) +31-30-2531492(secr.)  Fax: +31-30-2518689
> NIKHEF:  +31-20-5922028(direct) +31-20-5922000(secr.)  Fax: +31-20-5925155
> CERN:    +41-22-7679751(direct) +41-22-7675857(secr.)  Fax: +41-22-7679480
> Offices: Buys Ballot lab. 710 (Utrecht)   H350 (Nikhef)   B23 1-020 (CERN)
> --------------------------------------------------------------------------
>
>
> "Valeri Fine (Faine)" wrote:
> >
> > Hello, Nick
> >
> > Thank you very much for your advice.
> > However I've call  Windows ROOT user attention the Nick's proposal works
> > well on Windows 9x systems.
> > For NT family, i.e. For Windows NT and Windows 2000 one should not edit autoexec.bat rather t
> > set
> >          "My computer"/"Properties"/"enviroinment".
> >
> > By may reasons ROOT assumes the following environament variable is provided:
> >
> >   ROOTSYS=
> >   PATH = %ROOTSYS%\bin;%PATH
> >   TMP
> >   TEMP
> >   HOME
> >
> >  The WIN32 implementation of TSystem::HomeDirectory(const char* username) method defines
> >   the internal "ROOT" HOME  as follows:
> >
> >   static char mydir[kMAXPATHLEN]="./";
> >   const char *h = 0;
> >    if (!(h = ::getenv("home"))) h = ::getenv("HOME");
> >
> >    if (h) strcpy(mydir,h);
> >    else {
> >       // for Windows NT HOME might be defined as either $(HOMESHARE)/$(HOMEPATH)
> >       //                                         or     $(HOMEDRIVE)/$(HOMEPATH)
> >      h = ::getenv("HOMESHARE");
> >      if (!h)  h = ::getenv("HOMEDRIVE");
> >      if (h) {
> >          strcpy(mydir,h);
> >          h=::getenv("HOMEPATH");
> >          if(h) strcat(mydir,h);
> >      }
> >    }
> >    return mydir;
> >  }
> >
> > This means if one doesn't define HOME env. variable it is to be "calculated" as the code
> > above shows.
> >
> >    Hope this helps,
> >         Valeri
> >
> > ----- Original Message -----
> > From: Nick van Eijndhoven <Nick@phys.uu.nl>
> > To: <Sajan.Easo@cern.ch>
> > Cc: ROOT discussion group <roottalk@pcroot.cern.ch>
> > Sent: 9 февраля 2001 г. 8:24
> > Subject: [ROOT] Winxx pathnames.
> >
> > > Dear Sajan,
> > > Here is the configuration I use :
> > >
> > > c:\root  is the directory where all the root stuff resides.
> > >
> > > In my autoexec.bat I set the following environment variables :
> > >
> > > set TEMP=c:\temp
> > > set HOME=c:\nick
> > > set TMPDIR=c:\temp
> > > set ROOTSYS=c:\root
> > > set PATH=%PATH%;%ROOTSYS%\bin
> > >
> > > Before trying things out, you have to restart your system.
> > >
> > > If you then put in the $HOME directory the files rootlogon.C, rootlogoff.C
> > > rootalias.C and .rootrc these files will then be used by default when you
> > > start up a root session. However, if a modified copy of one of these files
> > > resides in your current working directory, root takes that version.
> > > To start a ROOT session, just open a DOS box and type root.
> > > Hope this helps you in getting started.
> > >
> > >                                                       Cheers,
> > >                                                        Nick.
> > >
> > > --
> > > Dr. Nick van Eijndhoven mailto:nick@phys.uu.nl http://www.phys.uu.nl/~nick
> > > --------------------------------------------------------------------------
> > > Org.:    Utrecht University/Nikhef, Department of Subatomic Physics
> > > Address: P.O. Box 80.000, NL-3508 TA Utrecht, The Netherlands
> > > Phone:   +31-30-2532331(direct) +31-30-2531492(secr.)  Fax: +31-30-2518689
> > > NIKHEF:  +31-20-5922028(direct) +31-20-5922000(secr.)  Fax: +31-20-5925155
> > > CERN:    +41-22-7679751(direct) +41-22-7675857(secr.)  Fax: +41-22-7679480
> > > Offices: Buys Ballot lab. 710 (Utrecht)   H350 (Nikhef)   B23 1-020 (CERN)
> > > --------------------------------------------------------------------------
> > >
> > > ================ Original message ===================
> > > Dear Sir,
> > >   I have been trying to run ROOT on a windows NT and windows95 system
> > > which are on the cern NICE network.
> > >
> > > On the NT,I am unable to make it execute the
> > > macro files (.C ) files which are in  my private directory. The only way
> > > I can run ROOT is by clicking the button on root.exe and not by typing
> > > from the command prompt.
> > > Could you advice me on how to setup the pathnames correctly for
> > > NT and for w95, please. We looked through the ROOT web pages and
> > > even our system manager has difficulty in figuring this out.
> > > I have the pro verson of ROOT and the version 6.0 of the Visual Studio.
> > >
> > >
> > > Thanks and regards,
> > > Sajan.Easo@cern.ch
> > >
>



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:35 MET