2016-04-01 7 views
2

マシンからMcAfeeソフトウェアを削除するための小さなバッチスクリプトをまとめました。テストされ、すべて動作しますが、8.3を疑います。私のスクリプトが意図したとおりに完了しない可能性があります。ここでmcafeeエージェントソフトウェアを削除するバッチスクリプト

は、スクリプトで、私のスクリプトが動作しない理由を答えかもしれないスクリプトを以下のログ:ここ

@echo off 

::check if mcafeetemp directory exists 
if exist C:\mcafeetemp\NUL echo "Folder already exists" 
if not exist C:\mcafeetemp\NUL echo "Folder does not exist" 
mkdir c:\mcafeetemp\ 
pause 

::check 64bit or x86 
dir "C:\Program Files (x86)\\." > NUL 2>&1 
if errorlevel 0 (
set PROGRAMS_HOME="C:\Program Files (x86)" 
GOTO HomeSet 
) 

dir "C:\Program Files\\." > NUL 2>&1 
if errorlevel 0 (
set PROGRAMS_HOME="C:\Program Files" 
GOTO HomeSet 
) 
GOTO NotWindows 

:HomeSet 
set PROGRAMS_HOME=%PROGRAMS_HOME:"=% 
echo PROGRAMS_HOME set to %PROGRAMS_HOME% 
:NotWindows 
pause 

::remove mcafee agent 
"%PROGRAMS_HOME%\McAfee\Common Framework\frminst.exe" /forceuninstall /Silent > c:\mcafeetemp\forceremovelog.txt 
::shutdown /r /f /t 120 /d P:4:2 /c "Old McAfee agent removed. Reboot required." 
endlocal 
pause 
EXIT /B 200 

はログです:

2016-04-01 13:32:21.189 I 6048 Setup START ["C:\Program Files (x86)\McAfee\Common Framework\frminst.exe" /forceuninstall /Silent ] 
2016-04-01 13:32:21.189 I 6048 Setup Windows 6.1.7601 Service Pack 1 
2016-04-01 13:32:21.190 I 6048 msiFix Finding agent MSI product code 
2016-04-01 13:32:21.190 I 6048 msiFix Got MSI product code {4AEFF024-F0D0-4AD6-8231-FF51949E91E0} 
2016-04-01 13:32:21.190 I 6048 msiFix Finding agent MSI version 
2016-04-01 13:32:21.190 I 6048 msiFix Got agent MSI version 4.6.3001 
2016-04-01 13:32:21.190 I 6048 msiFix Nothing to fix for this agent version 
2016-04-01 13:32:21.190 I 6048 Setup Attempting to perform a setup operation 
2016-04-01 13:32:21.192 I 6048 Cmalib Referencer 1 HOSTIPS_8000 
2016-04-01 13:32:21.192 I 6048 Cmalib Referencer 2 VIRUSCAN8800 
2016-04-01 13:32:21.194 I 6048 caShrLb Installed version=4.6.0.3122 
2016-04-01 13:32:21.194 I 6048 caShrLb Product count=2 
2016-04-01 13:32:21.194 I 6048 caShrLb Managed mode=1 
2016-04-01 13:32:21.194 I 6048 Setup Legacy installed=0 
2016-04-01 13:32:21.194 I 6048 Setup Higher version installed=0 
2016-04-01 13:32:21.194 I 6048 Setup Existing Installed Path=C:\Program Files (x86)\McAfee\Common Framework 
2016-04-01 13:32:21.194 I 6048 Setup Existing Data Path=C:\ProgramData\McAfee\Common Framework 
2016-04-01 13:32:21.194 I 6048 Setup Existing setup program=C:\Program Files (x86)\McAfee\Common Framework\frminst.exe 
2016-04-01 13:32:21.194 I 6048 Setup LangInRegistry=[] 
2016-04-01 13:32:21.195 I 6048 Setup C:\Windows\SysWOW64\msiexec.exe /x {4AEFF024-F0D0-4AD6-8231-FF51949E91E0} FORCEUNINSTALL=True /q REBOOT=R /l+*v "C:\Users\xxxxxx~1\AppData\Local\Temp\McAfeeLogs\MFEagent.msi.2016.04.01.13.32.21.log" FRMINSTLOGFILE="C:\Users\xxxxxx~1\AppData\Local\Temp\McAfeeLogs\FrmInst_{systemname}" 
2016-04-01 13:32:21.846 E 6048 Setup Error trace: 
2016-04-01 13:32:21.846 E 6048 Thread [Main thread]-> 
2016-04-01 13:32:21.846 E 6048 Setup  [Attempting to perform a setup operation]-> 
2016-04-01 13:32:21.846 E 6048 Setup  [Run MSI]-> 
2016-04-01 13:32:21.846 E 6048 Setup  error 1612: The installation source for this product is not available. Verify that the source exists and that you can access it. 
2016-04-01 13:32:21.846 E 6048 UI  Error trace: 
2016-04-01 13:32:21.846 E 6048 Thread [Main thread]-> 
2016-04-01 13:32:21.846 E 6048 UI   The installation source for this product is not available. Verify that the source exists and that you can access it. 
2016-04-01 13:32:21.846 I 6048 Thread Exit program 
2016-04-01 13:32:21.846 I 6048 Setup END 1603 

希望、これは十分な情報です、私はほとんどそこにいると思う、ちょうどどこかで何かが見つからない?これについてのあなたの考えは高く評価されます。

更新日:

これをちょうどフォローアップしますか?

そして私は、私は場所で、この特定のレジストリがMcAfeeのKBあたりのように説明更新することができます見ることができるものからhttps://superuser.com/questions/607572/how-do-i-modify-the-data-of-an-existing-registry-key-value-name-from-cmd

見つかりスレッドは: https://kc.mcafee.com/corporate/index?page=content&id=kb51431

set append=XXXXXX 
set key=HKCU\Software\myTest 
set value=myValue 
set oldVal= 

for /F "skip=2 tokens=3" %%r in ('reg query %key% /v %value%') do set oldVal=%%r 
echo previous=%oldVal% 
set newVal=%oldVal%%append% 
reg add %key% /v %value% /d %newVal% /f' 
+0

誰かがこれについてまだ提案しているでしょうか? :) –

答えて

1

私はそれが働いて得ることができました。 x86システムでRanスクリプトを再実行し、正常に完了しました。正確な原因が前回の作業ではなく、作成されたログから正常に完了したことを確認しました。

関連する問題