CellServDB update 14 Mar 2017
[openafs.git] / src / WINNT / install / wix / replace_afs.cmd
1 @echo off
2
3 if "%1"=="" goto show_usage
4
5 rem Instead of running the script from the current location
6 rem we copy ourselves over to the TMP directory and run
7 rem from there.
8
9 if not "%2"=="intemp" goto copy_and_run
10
11 rem Do the actual work
12
13 setlocal
14 echo This will replace the current installation of OpenAFS with
15 echo the upgraded version at :
16 echo   "%~f1"
17 set /p response=Continue? (y/n):
18 if "%response%"=="y" goto do_this
19 if "%response%"=="Y" goto do_this
20 endlocal
21
22 echo Cancelling.  No changes were made to your computer.
23
24 goto end_script
25
26 :do_this
27 endlocal
28
29 echo Running MSIEXEC:
30 echo on
31
32 msiexec /fvomus "%~f1"
33
34 @echo off
35 echo Done.
36
37 goto end_script
38
39 :copy_and_run
40
41 copy "%~f0" "%TMP%\tmp_replace_afs.cmd"
42 "%TMP%\tmp_replace_afs.cmd" "%~f1" intemp
43
44 goto end_script
45
46 :show_usage
47 echo %0: Upgrade an existing installation of OpenAFS
48 echo.
49 echo This command replaces the existing installation with a new
50 echo installation.  You need to obtain the new .MSI from openafs.org
51 echo and run this command as follows :
52 echo.
53 echo   %0 [path to new .msi]
54 echo.
55 echo The latest release can be found at the following URL:
56 echo      http://www.openafs.org/release/latest.html
57 echo.
58
59 :end_script