我有一些用batch
编写的脚本,它正在卸载Rational Softwares(ClearCase,ClearQuest),我正在为启动添加另一个脚本,但不知何故,当脚本运行时,这个注册表项被删除。
这是我的剧本:
SET ratinalDestFolder=C:\Rational_SW
SET UninstallTool=\\ta1bbn01\Public\Migration\CC\rationaluninstalltool.exe
::SET logFile=\\ta1bbn01\Public\Migration\uninstallLogs\%COMPUTERNAME%-%USERNAME%.log
SET logFile=%ratinalDestFolder%\%COMPUTERNAME%-%USERNAME%.log
ECHO Adding the registry file of the installation script
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce /v RATIONAL_INSTALLATION /d \\ta1bbn01\Public\Migration\Alex\rationalInstallationWin64_Final.bat || ECHO Failed to add isntallation script
ECHO Copying the uninstall tool %ratinalDestFolder%
xcopy %UninstallTool% %ratinalDestFolder%\
ECHO Uninstalling Rational Products
%ratinalDestFolder%\rationaluninstalltool.exe %logFile% -c
知道为什么在执行第一个脚本时删除添加到启动的脚本。