source: gsas/win/dist/makeregistry.bat @ 1099

Last change on this file since 1099 was 1099, checked in by toby, 12 years ago

update install scripts

File size: 2.2 KB
Line 
1@ECHO OFF
2@echo =======================================================
3@echo This file creates registry entries for GSAS and EXPGUI
4@echo = Run this from the directory where GSAS is installed =
5@echo =======================================================
6
7REM Get this script's directory; make sure that the path ends
8REM    with a single backslash
9set gsasloc=%~dp0\*
10set gsasloc=%gsasloc:\\*=\*%
11set gsasloc=%gsasloc:\*=\%
12
13REM test if representative files are found
14IF NOT EXIST %gsasloc%gsas.ico GOTO IconNotFound
15IF NOT EXIST %gsasloc%exe  GOTO EXENotFound
16IF NOT EXIST %gsasloc%exe\ncnrpack.exe  GOTO TclNotFound
17
18
19REM changed from HKLM to HKCU due to problems on Vista(?)
20@ECHO ON
21reg add HKCU\Software\Classes\.exp /ve /d EXPfile /f
22reg add HKCU\Software\Classes\EXPfile /v "GSAS experiment file" /d "GSAS Experiment File" /f
23reg add HKCU\Software\Classes\EXPfile\DefaultIcon /ve /d %gsasloc%gsas.ico,0 /f
24reg add HKCU\Software\Classes\EXPfile\Shell\EXPEDT\command /ve /d "%gsasloc%exe\expedt.exe %%1" /f
25reg add HKCU\Software\Classes\EXPfile\Shell\EXPGUI\command /ve /d "%gsasloc%exe\ncnrpack.exe %gsasloc%expgui\expgui ""%%1""" /f
26reg add HKCU\Software\Classes\EXPfile\Shell\GENLES\command /ve /d "%gsasloc%exe\genles.exe %%1" /f
27reg add HKCU\Software\Classes\EXPfile\Shell\PC-GSAS\command /ve /d "%gsasloc%exe\PC-GSAS.exe %%1" /f
28reg add HKCU\Software\Classes\EXPfile\Shell\POWPLOT\command /ve /d "%gsasloc%exe\powplot.exe %%1" /f
29reg add HKCU\Software\Classes\EXPfile\Shell\POWPREF\command /ve /d "%gsasloc%exe\powpref.exe %%1" /f
30
31REM The following command can be edited to select the default command when a .EXP file is double clicked
32REM Choices are EXPGUI, EXPEDT, GENLES, PS-GSAS, POWPREF or POWPLOT
33reg add HKCU\Software\Classes\EXPfile\Shell /ve /d EXPGUI /f
34
35pause
36exit
37
38:IconNotFound
39echo Error: File %gsasloc%gsas.ico was not found. Was this batch file run from a location other than the GSAS directory?
40pause
41        exit
42
43:EXENotFound
44echo ERROR: Directory %gsasloc%exe was not found. Was this batch file run from a location other than the GSAS directory?
45pause
46exit
47
48:TclNotFound
49echo ERROR: File %gsasloc%exe\ncnrpack.exe was not found. Was this batch file run from a location other than the GSAS directory?
50pause
51exit
52
Note: See TracBrowser for help on using the repository browser.