Hi Anton,
Indeed the long names give problems.
I always install the root stuff in c:\root on my win98 box and
this doesn't give any problems considering the PATH etc....
Why not make this as default directory.
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)
--------------------------------------------------------------------------
Anton Fokin wrote:
>
> Rene,
>
> InstallShield code below will set ROOTSYS and PATH on win9x/NT/200. I am
> runnning win98, so you have to check it on NT/2000. If it works for a local
> user on NT, I can add "administrator on-line" check and if it is so, install
> ROOT for all users on this comp.
>
> There is a problem with ROOTSYS and long/short names in autoexec.bat on
> win9x. Paths should be "short" in the .bat file, i.e. autoexec.bat can not
> recognize
>
> SET ROOTSYS = C:\Program Files\ROOT
>
> Instead you have to write
>
> SET ROOTSYS= C:\Progra~1\ROOT
>
> and the same in the PATH.
>
> On the other hand ROOT doesn't understand
>
> ROOTSYS= C:\Progra~1\ROOT
>
> Could you check this with Valery? In your current InstallShield distribution
> the default path is c:\Program Files\root. I am curious if any win9x user
> has managed to run ROOT from this location.
>
> Regards,
> Anton
>
> // your global variables
>
> #define WM_WININICHANGE 0x001A
> #define HWND_BROADCAST 0xffff
>
> function OnFirstUIAfter()
> STRING szTitle, szMsg1, szMsg2, szOption1, szOption2;
> STRING szROOTSYS, szKey, szEnv;
> NUMBER bOpt1, bOpt2;
> POINTER pEnv;
>
> begin
>
> if (GetEnvVar ("ROOTSYS", szROOTSYS) < 0) then
>
> if (SYSINFO.WIN9X.bWin9X) then
>
> // MessageBox ("WIN 9x detected", INFORMATION);
>
> BatchFileLoad("");
>
> szROOTSYS = TARGETDIR;
>
> if (BatchAdd("ROOTSYS", szROOTSYS, "PATH", BEFORE) < 0) then
> MessageBox ("Setting ROOTSYS failed", INFORMATION);
> endif;
>
> LongPathToShortPath(szROOTSYS);
>
> if (BatchAdd ("PATH", szROOTSYS+"\\bin;%PATH%", "PATH", AFTER) < 0)
> then
> MessageBox ("Setting ROOT PATH failed", INFORMATION);
> endif;
>
> BatchFileSave("AUTOEXEC.OLD");
>
> BATCH_INSTALL = TRUE;
> endif;
>
> if (SYSINFO.WINNT.bWinNT || SYSINFO.WINNT.bWin2000) then
>
> // MessageBox ("WIN NT/2000 detected", INFORMATION);
>
> szKey="Environment";
> RegDBSetDefaultRoot(HKEY_CURRENT_USER);
> RegDBSetKeyValueEx(szKey,"ROOTSYS",REGDB_STRING,TARGETDIR,-1);
>
> szEnv = "Environment";
> pEnv = &szEnv;
> SendMessage (HWND_BROADCAST, WM_WININICHANGE, 0, pEnv );
>
> endif;
>
> endif;
>
> Disable(STATUSEX);
>
> ShowObjWizardPages(NEXT);
>
> bOpt1 = FALSE;
> bOpt2 = FALSE;
> szMsg1 = "RQuant installation successfully finished!" +
> "\n\nYour system.rootrc file has been copied to
> system.rootrc.old"; // SdLoadString(IFX_SDFINISH_MSG1);
> SdFinishEx(szTitle, szMsg1, szMsg2, szOption1, szOption2, bOpt1, bOpt2);
> end;
>
> http://www.smartquant.com
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:36 MET