0

我是我家族拥有的房地产金融业务的新手程序员/IT 人员。长话短说,大约 25-30 年前,我们创建了一个基于 dBASE III 的应用程序系统来跟踪所有客户帐户。更改为现代系统的成本将是天文数字,因为我可以以合理的效率进行编码,所以我们保留它。没问题,但每个人都在不同的工作站上使用单个用户版本。我想安装 dBASE 管理员并将其更改为网络环境。我想进入它我会有点超出我的深度,但能够完成它。我目前在 Windows XP 系统上运行它,没有互联网连接,所有这些都只是 LANd 在一起。

我从 vetusware 获得了安装磁盘映像。我通过虚拟软盘安装了图像。在命令提示符中,我导航到磁盘并按照手册中的说明进行操作:

  1. 将系统磁盘 #1 插入驱动器 A。
  2. 通过键入 A:[return] 将默认驱动器更改为 A

到目前为止一切顺利......我有一个提示。

然后输入: A> INSTALL C: DBA

我键入“INSTALL C:DBA”,它启动了在磁盘上找到的“INSTALL.BAT”,但很快报告“此时goto 是意外的”。并将我返回到 A 提示符。

我将在下面发布批处理文件文本。执行后,它会显示以“...previous version of dBASE”结尾的“回显”文本的顶部。但接下来的一行是“goto was unexpected...”

这似乎是 INSTALL 批处理文件有问题,而我没有做任何事情......我知道这是一个批处理文件错误,而不是程序内部的错误。同样奇怪的是,该程序提到了这个 DBA.COM,并且在任何磁盘上都找不到它......任何人都可以提供的任何帮助或指导将不胜感激。

非常感谢,

克里斯

    echo off
    cls
    echo 
    echo                dBASE III PLUS VERSION 1.1
    echo                  HARD DISK INSTALLATION 
    echo 
    echo You can copy  dBASE III PLUS  to your  hard disk  by following
    echo these  installation  instructions.  You  can  also  use  these
    echo instructions to install dBASE ADMINISTRATOR.
    echo 
    echo If you want to  save a  previously installed version of dBASE,
    echo uninstall it using that version's UNINSTAL program.
    echo 
    echo If you choose not  to save a  previous version,  install dBASE
    echo III PLUS Version 1.1 into the same directory.  This will auto-
    echo matically erase the previous version of dBASE.
    echo 
    if "%1==" goto Helpinst
    for %%f in (C:,c:,D:,d:,E:,e:,F:,f:,G:,g:,H:,h:,Y:,y:) do if %1.==%%f. goto START
    for %%f in (I:,i:,J:,j:,K:,k:,L:,l:,M:,m:,N:,n:,O:,o:,P:,p:,Z:,z:) do if %1.==%%f. goto START
    for %%f in (Q:,q:,R:,r:,S:,s:,T:,t:,U:,u:,V:,v:,W:,w:,X:,x:) do if %1.==%%f. goto START
    goto BADDRIVE
    :START
    if "==%2" goto DBASE
    if %2.==DBA. goto DBA
    if %2.==dba. goto DBA
    goto Helpinst
    :DBASE
    echo dBASE III PLUS will be installed on drive %1
    echo 
    yn Y N 30 Do you want to continue (Y/N)?
    if ERRORLEVEL 1 goto DBASE1
    goto END
    :DBASE1
    if exist dbase.lod goto ID
    if exist %1dbase.exe goto ErrExist
    if exist %1dba.com goto ERREXT
    if not exist id.exe goto MISS
    %1
    a:id /S
    a:
    echo Copying files to drive %1 . . .
    echo 
    copy dbase.exe %1
    copy dbaseinl.ovl %1
    copy dbase.msg %1
    if not exist %1config.db copy config.db %1
    if not exist %1config.sys copy config.sys %1
    :SYS2
    echo 
    echo Insert the dBASE III PLUS System Disk #2 in drive A.
    echo 
    pause
    if not exist dbase.ovl goto SYS2
    echo 
    echo Copying files to drive %1 . . .
    echo 
    copy dbase.ovl %1
    copy help.dbs %1
    copy assist.hlp %1
    if not exist %1dbase.ovl goto ErrDbase
    if not exist %1dbase.exe goto ErrDbase
    if not exist %1dbase.msg goto ErrDbase
    if not exist %1dbaseinl.ovl goto ErrDbase
    echo 
    echo dBASE III PLUS has been successfully installed.
    goto End
    :DBA
    echo dBASE ADMINISTRATOR will be installed on drive %1
    echo 
    yn Y N 30 Do you want to continue (Y/N)?
    if ERRORLEVEL 1 goto Ad1
    goto END
    :Ad1
    if exist dba.lod goto GETSYS1
    if exist %1dba.com goto ERREXT
    if exist %1dbase.exe goto ErrExist
    if not exist dbaseinl.ovl goto GETSYS1
    echo 
    echo Copying files to drive %1 . . .
    echo 
    copy help.dbs %1
    echo 
    :AD2
    echo 
    echo Insert the Administrator #1 disk in drive A
    echo 
    pause
    echo 
    if not exist dba.lod goto AD2
    :AD3
    if exist installh.sg3 goto INITDBA
    if not exist idlan.exe goto MISS
    %1
    a:idlan /M
    a:
    installh p=a t=%1
    if ERRORLEVEL 1 goto ErrDBA
    echo 
    copy dba.lod %1\dbnetctl.300
    copy dbase.msg %1
    copy protect.exe %1
    copy assist.hlp %1
    echo 
    :Ad4
    echo 
    echo Insert the Administrator #2 disk in drive A
    echo 
    pause
    echo 
    if not exist dba.ovl goto AD4
    echo Copying files to drive %1 . . .
    echo 
    copy dba.ovl %1
    copy adduser.com %1
    echo 
    echo dBASE ADMINISTRATOR has been successfully installed
    echo  
    echo One user may now run dBASE ADMINISTRATOR.  To add more users,
    echo run the  ADDUSER program.  The ADDUSER  program is located in
    echo the directory in which dBASE ADMINISTRATOR is installed.
    echo 
    goto END
    :Helpinst
    echo  You entered the command incorrectly.  The correct syntax is:
    echo 
    echo    "INSTALL <drive:>"      To install dBASE III PLUS.
    echo 
    echo    "INSTALL <drive:> DBA"      To install dBASE ADMINISTRATOR.
    echo 
    echo Install is aborted.
    goto End
   :ErrExist
    echo 
    echo  dBASE III PLUS already exists in the destination drive.
    goto ErrUnst
   :ERREXT
    echo 
    echo  dBASE ADMINISTRATOR already exists in the destination drive.
    :ErrUnst
    echo 
    echo Install is aborted.
    goto End
    :BADDRIVE
    echo  
    echo Invalid drive letter specified.  Install is aborted.
    goto Helpinst
    :ErrDbase
    echo  
    echo dBASE III PLUS is not installed.  Install is aborted.
    goto END
    :MISS
    echo  
    echo Your system disk has missing files.  Install is aborted.
    echo 
    goto DELFILE
    :ID
    echo  
    echo dBASE III PLUS has not been identified.  Please run ID.
    echo 
    goto END
    :INITDBA
    echo  
    echo dBASE ADMINISTRATOR has not been identified.  Please run IDLAN.
    echo 
    goto DELFILE
    :GETSYS1
    echo  
    echo Please use the dBASE III PLUS System Disk #1 to run the installation.
    echo Install is aborted.
    echo 
    goto END
    :ErrDBA
    echo  
    echo dBASE ADMINISTRATOR installation has been aborted.
    echo 
    :DELFILE
    if exist %1help.dbs del %1help.dbs
    :End
4

1 回答 1

0

您的问题是安装脚本是为 MS-DOS 命令解释器 ( COMMAND.COM) 编写的,与 Windows XP 命令解释器 ( ) 不兼容cmd.exe。具体问题是 XP 解释器赋予双引号字符 (") 特殊含义,而 MS-DOS 解释器没有。这导致以下行在 XP 下被不同地解释为错误:

if "%1==" goto Helpinst

我不建议尝试将脚本“修复”为与 Windows XP 兼容。除了必须修复许多这样的行之外,还有一个更简单的解决方案。只需使用 MS-DOS 命令解释器。您可以通过command在命令提示符下输入来执行此操作。然后像往常一样按照说明进行操作。例如:

command 
a:
install c: dba
于 2016-04-20T15:03:33.380 回答